Commit f727cc8e authored by Robert Ricci's avatar Robert Ricci

Back my last set of changes all the way out (Leigh had already

started.) Instead of avoiding sending an event when we think the
node will be sending it, go back to always sending it. Nodes
sending the events on shutdown just isn't reliable enough. Instead,
we'll just make two REBOOT events in a row legal.
parent f287f157
......@@ -266,7 +266,7 @@ exit $failed;
#
sub RebootNode {
local($pc) = @_;
local($status, $syspid, $mypid,$setstate);
local($status, $syspid, $mypid);
print STDOUT "Rebooting $pc ...\n";
......@@ -290,13 +290,6 @@ sub RebootNode {
exit(0);
}
#
# Keep track of whether or not we need to set the event state for the
# node. If we get to ssh and reboot it, the node should report the
# reboot, so we don't have to.
#
$setstate = 1;
#
# Machine is pingable at least. Try to reboot it gracefully,
# or power cycle anyway if that does not work.
......@@ -343,14 +336,7 @@ sub RebootNode {
print STDERR "Trying Ping-of-Death on $pc ...\n" if $debug;
system("$ipod $pc");
} else {
#
# OK, ssh worked, so the node should have reported the state
# transition itself.
#
#$setstate = 0;
}
}
else {
exec("$ssh -host $pc /sbin/reboot");
......@@ -370,9 +356,7 @@ sub RebootNode {
# punch the power button.
#
if (WaitTillDead($pc) == 0) {
if ($setstate) {
TBSetNodeEventState($pc,TBDB_NODESTATE_REBOOTING);
}
TBSetNodeEventState($pc,TBDB_NODESTATE_REBOOTING);
exit(0);
}
......
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