Fix connection issues when changing node FQDN; closes #1931
This commit is contained in:
parent
86dbb141f4
commit
33a7762152
1 changed files with 13 additions and 0 deletions
|
@ -77,6 +77,19 @@ class NodeUpdateService
|
||||||
$updated = $this->repository->withFreshModel()->update($node->id, $data, true, true);
|
$updated = $this->repository->withFreshModel()->update($node->id, $data, true, true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// If we're changing the FQDN for the node, use the newly provided FQDN for the connection
|
||||||
|
// address. This should alleviate issues where the node gets pointed to a "valid" FQDN that
|
||||||
|
// isn't actually running the daemon software, and therefore you can't actually change it
|
||||||
|
// back.
|
||||||
|
//
|
||||||
|
// This makes more sense anyways, because only the Panel uses the FQDN for connecting, the
|
||||||
|
// node doesn't actually care about this.
|
||||||
|
//
|
||||||
|
// @see https://github.com/pterodactyl/panel/issues/1931
|
||||||
|
if (! empty($data['fqdn'])) {
|
||||||
|
$node->fqdn = $data['fqdn'];
|
||||||
|
}
|
||||||
|
|
||||||
$this->configurationRepository->setNode($node)->update($updated);
|
$this->configurationRepository->setNode($node)->update($updated);
|
||||||
} catch (DaemonConnectionException $exception) {
|
} catch (DaemonConnectionException $exception) {
|
||||||
if (! is_null($exception->getPrevious()) && $exception->getPrevious() instanceof ConnectException) {
|
if (! is_null($exception->getPrevious()) && $exception->getPrevious() instanceof ConnectException) {
|
||||||
|
|
Loading…
Reference in a new issue