summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol
diff options
context:
space:
mode:
authorSimon Rettberg2022-12-05 12:09:58 +0100
committerSimon Rettberg2022-12-05 12:09:58 +0100
commit2dedfb97c9121862423ab0fc10bf6a5081315be2 (patch)
treecc0b8129074a907e85c0d626dbb935271f6cc3eb /modules-available/rebootcontrol
parent[rebootcontrol/vmstore] Fix ArrayUtil::sortByColumn() calls (diff)
downloadslx-admin-2dedfb97c9121862423ab0fc10bf6a5081315be2.tar.gz
slx-admin-2dedfb97c9121862423ab0fc10bf6a5081315be2.tar.xz
slx-admin-2dedfb97c9121862423ab0fc10bf6a5081315be2.zip
[rebootcontrol] WOL from Server > WOL from other subnet's client
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r--modules-available/rebootcontrol/inc/rebootcontrol.inc.php6
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);