Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
53e28cb9
Commit
53e28cb9
authored
Jan 13, 2011
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/endexp.in
View file @
53e28cb9
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-201
0
University of Utah and the Flux Group.
# Copyright (c) 2000-201
1
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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment