Commit 53e28cb9 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add a sanity check to make sure there are no nodes allocated to an

experiment before it is wiped out for good.
parent 731af9e4
#!/usr/bin/perl -wT
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
use English;
......@@ -488,6 +488,16 @@ if ($estate eq EXPTSTATE_ACTIVE) {
system("$archcontrol -t endexp commit $pid $eid");
# At this point, there should not be any nodes allocated. But lets
# make this sanity check cause it happens when administrators bypass
# the normal order of things.
my @pnodes = $experiment->NodeList(1, 1);
if (@pnodes) {
fatal("Experiment is not active, but there are nodes allocated: @pnodes\n");
if ($estate eq EXPTSTATE_SWAPPED ||
$estate eq EXPTSTATE_QUEUED) {
$experiment->GatherSwapStats($this_user, TBDB_STATS_TERMINATE, 0,
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