All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 9320782d authored by Leigh B Stoller's avatar Leigh B Stoller

Paniced slices cannot be terminated, need to catch that earlier

and return REFUSED.
parent cdd60e03
......@@ -59,6 +59,7 @@ use GeniStd;
use emutil;
use libEmulab;
use English;
use EmulabConstants;
use libtestbed;
use Data::Dumper;
use XML::Simple;
......@@ -906,6 +907,18 @@ sub DeleteSlice($)
}
my $slice_experiment = $slice->GetExperiment();
#
# Do not allow a paniced slice to be terminated until the panic
# is cleared.
#
if ($slice_experiment->state() eq EXPTSTATE_PANICED() ||
$slice_experiment->paniced()) {
print STDERR "Refusing to terminate a paniced experiment\n";
$slice->UnLock();
return GeniResponse->Create(GENIRESPONSE_REFUSED(), undef,
"Refusing to terminate a paniced experiment");
}
#
# If a monitor process is running, then the slice is busy.
# This might mean that the user will not be able to delete
......
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