Commit 54177df6 authored by Mike Hibler's avatar Mike Hibler

Do not power cycle IPMI-controlled nodes that are off when in hwdown.

For nodes that have the 'cyclewhenoff' attribute set.

NOTE that you still need to set 'cyclewhenoff' on all IPMI-controlled
node types (or nodes) for which you want "power cycle" to turn them on.
The default behavior is still to NOT allow power cycling when off.
parent f2dd68ef
......@@ -501,7 +501,14 @@ foreach my $power_id (keys %outlets) {
if ($op eq "cycle") {
foreach my $nodeid (@nodes) {
my $node = $nodes{$nodeid};
if ($node->cyclewhenoff()) {
# XXX disallow cycle-when-off when node is in hwdown.
# It is likely powered off for a reason.
if ($node->cyclewhenoff() &&
!($node->IsReserved() &&
$node->pid() eq NODEDEAD_PID() &&
$node->eid() eq NODEDEAD_EID())) {
push @forcenodes, $nodeid;
} else {
push @unforcenodes, $nodeid;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment