diff options
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r-- | modules-available/rebootcontrol/inc/rebootcontrol.inc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php index 132ff6ff..a37b070c 100644 --- a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php +++ b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php @@ -381,8 +381,6 @@ class RebootControl self::addSshMethodUsingClient($subnet['dclients'], $taskClient['methods'], $taskSsh); // Jumphost - usually in same subnet self::addSshMethodUsingJumphost($subnet['djumphosts'], true, $taskClient['methods'], $taskSsh); - // Use clients in other subnets, known to be able to reach the destination net - self::addSshMethodUsingClient($subnet['iclients'], $taskClient['methods'], $taskSsh); // Jumphosts in other subnets, determined to be able to reach destination subnet self::addSshMethodUsingJumphost($subnet['ijumphosts'], true, $taskClient['methods'], $taskSsh); // If directly reachable from server, prefer this now over the questionable approaches below, @@ -390,11 +388,15 @@ class RebootControl if ($overrideBroadcast === false && $subnet['isdirect']) { $taskClient['methods'][] = 'DIRECT'; } + // Use clients in other subnets, known to be able to reach the destination net + self::addSshMethodUsingClient($subnet['iclients'], $taskClient['methods'], $taskSsh); + // Add warning if nothing works if (empty($taskClient['methods'])) { $unreachable[] = $dbClient; } else { // TODO: Remember WOL was attempted } + // "Questionable approaches": // Last fallback is jumphosts that were not reachable when last checked, this is really a last resort self::addSshMethodUsingJumphost($subnet['djumphosts'], false, $taskClient['methods'], $taskSsh); self::addSshMethodUsingJumphost($subnet['ijumphosts'], false, $taskClient['methods'], $taskSsh); |