Commit f5849420 authored by Mike Hibler's avatar Mike Hibler
Browse files

Check for the case of no nodes when tearing down a firewalled experiment

(e.g., swapin was cancelled before any nodes were allocated)
parent a5055998
......@@ -496,22 +496,28 @@ sub doSwapout($) {
if ($soaction{'command'}) {
my @nodes = ExpNodes($pid, $eid, 1);
print STDERR "Performing swapout admin MFS actions.\n";
TBDebugTimeStamp("Performing swapout actions");
my @failed = ();
my %myargs = ();
$myargs{'name'} = "tbswap";
$myargs{'command'} = $soaction{'command'};
if (TBAdminMfsRunCmd(\%myargs, \@failed, @nodes)) {
if ($soaction{'isfatal'}) {
tberror
if (@nodes > 0) {
print STDERR "Performing swapout admin MFS actions.\n";
TBDebugTimeStamp("Performing swapout actions");
my @failed = ();
my %myargs = ();
$myargs{'name'} = "tbswap";
$myargs{'command'} = $soaction{'command'};
if (defined($soaction{'timeout'})) {
$myargs{'timeout'} = $soaction{'timeout'};
}
$myargs{'timestamp'} = 1;
if (TBAdminMfsRunCmd(\%myargs, \@failed, @nodes)) {
if ($soaction{'isfatal'}) {
tberror
"Failed to run '" . $soaction{'command'} .
"' on @failed!";
return 1;
}
tbwarn
"Failed to run '" . $soaction{'command'} .
"' on @failed!";
return 1;
}
tbwarn
"Failed to run '" . $soaction{'command'} .
"' on @failed!";
}
}
......@@ -1413,6 +1419,13 @@ sub undoFWNodes($$;@) {
$doall = 1;
}
#
# There has to at least be a firewall node to be interesting
#
if (@nodes == 0) {
return 0;
}
if ($doall) {
print "Taking down experiment firewall.\n";
} else {
......
Supports Markdown
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