Commit 278043d0 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Do not expire a panic'ed slice experiment.

parent 00cc6887
...@@ -131,6 +131,7 @@ require GeniAggregate; ...@@ -131,6 +131,7 @@ require GeniAggregate;
require Genixmlrpc; require Genixmlrpc;
use GeniResponse; use GeniResponse;
use Experiment; use Experiment;
use EmulabConstants;
use Node; use Node;
use libtestbed; use libtestbed;
use emutil; use emutil;
...@@ -444,6 +445,11 @@ sub ExpireSlices() ...@@ -444,6 +445,11 @@ sub ExpireSlices()
$slice->UnLock(); $slice->UnLock();
goto skip; goto skip;
} }
if ($experiment->state() eq EXPTSTATE_PANICED()) {
print STDERR "Refusing to terminate a paniced experiment\n";
goto skip;
}
# #
# See if we have any local nodes. No point in using the idle # See if we have any local nodes. No point in using the idle
# check if there are no nodes. # check if there are no nodes.
...@@ -578,11 +584,14 @@ sub RegisterSlices() ...@@ -578,11 +584,14 @@ sub RegisterSlices()
my $slice = $aggregate->GetSlice(); my $slice = $aggregate->GetSlice();
if (!defined($slice)) { if (!defined($slice)) {
# slice is gone, lets not worry. # slice is gone, lets not worry.
$aggregate->Flush();
next; next;
} }
# Run the register script. Ignore errors; we will retry again later. # Run the register script. Ignore errors; we will retry again later.
print STDERR "Registering $slice ($aggregate)\n"; print STDERR "Registering $slice ($aggregate)\n";
system("$REGISTER " . $slice->idx()); system("$REGISTER " . $slice->idx());
$slice->Flush();
$aggregate->Flush();
} }
} }
...@@ -986,7 +995,7 @@ sub CheckIdle() ...@@ -986,7 +995,7 @@ sub CheckIdle()
if (!defined($experiment)) { if (!defined($experiment)) {
print STDERR "Could not get experiment for $slice. Expiring ...\n"; print STDERR "Could not get experiment for $slice. Expiring ...\n";
$slice->UnLock(); $slice->UnLock();
goto cleanup; goto skip;
} }
if ($experiment->Refresh() != 0) { if ($experiment->Refresh() != 0) {
print STDERR "Could not flush $experiment\n"; print STDERR "Could not flush $experiment\n";
......
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