Commit 7d16e8f4 authored by Leigh Stoller's avatar Leigh Stoller

More tweaks.

parent 20571ad1
...@@ -108,6 +108,14 @@ if ($experiment->state() eq EXPTSTATE_SWAPPED()) { ...@@ -108,6 +108,14 @@ if ($experiment->state() eq EXPTSTATE_SWAPPED()) {
my $pid = $experiment->pid(); my $pid = $experiment->pid();
my $eid = $experiment->eid(); my $eid = $experiment->eid();
#
# We need the hwdown experiment below.
#
my $hwdown_experiment = Experiment->Lookup(NODEDEAD_PID(), NODEDEAD_EID());
if (!defined($hwdown_experiment)) {
fatal("Cannot find the hwdown experiment.");
}
# Go to ground. # Go to ground.
if (! $debug) { if (! $debug) {
if (TBBackGround($LOGFILE)) { if (TBBackGround($LOGFILE)) {
...@@ -167,7 +175,7 @@ while (1) { ...@@ -167,7 +175,7 @@ while (1) {
# push it into the hwcheckup experiment. # push it into the hwcheckup experiment.
# #
if ($node->MoveReservation($experiment)) { if ($node->MoveReservation($experiment)) {
print STDERR "Could not move $node in $NODEILL_EID\n"; print STDERR "Could not move $node to $experiment\n";
next; next;
} }
$node->InsertNodeLogEntry($elabman, TB_DEFAULT_NODELOGTYPE(), $node->InsertNodeLogEntry($elabman, TB_DEFAULT_NODELOGTYPE(),
...@@ -197,6 +205,8 @@ while (1) { ...@@ -197,6 +205,8 @@ while (1) {
} }
@nodelist = @tmp; @nodelist = @tmp;
print "Checking nodes @nodelist\n";
if (@nodelist) { if (@nodelist) {
print "Running $GENTOPOFILE ...\n"; print "Running $GENTOPOFILE ...\n";
if (system("$GENTOPOFILE $pid $eid")) { if (system("$GENTOPOFILE $pid $eid")) {
...@@ -288,8 +298,11 @@ sub NodeIsDead($) ...@@ -288,8 +298,11 @@ sub NodeIsDead($)
{ {
my ($node) = @_; my ($node) = @_;
if ($node->MoveReservation($hwdown_experiment)) {
print STDERR "Could not move $node to $hwdown_experiment\n";
return;
}
print STDERR "$node is fatally ill; moving to hwdown.\n"; print STDERR "$node is fatally ill; moving to hwdown.\n";
$node->MarkAsDown();
$node->InsertNodeLogEntry($elabman, TB_DEFAULT_NODELOGTYPE(), $node->InsertNodeLogEntry($elabman, TB_DEFAULT_NODELOGTYPE(),
"Moved to hwdown by checknodes daemon"); "Moved to hwdown by checknodes daemon");
} }
......
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