Commit fda4dc71 authored by Leigh B Stoller's avatar Leigh B Stoller

Refresh experiment object after locking.

parent 8f68ed9a
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -410,7 +410,11 @@ else {
" Experiment $pid/$eid appears to be in the wrong state: $estate\n");
}
# Unlock tables at same time.
$experiment->Lock($nextstate, 1);
$experiment->Lock($nextstate, 1) == 0
or die("*** $0:\n".
" Experiment $pid/$eid could not be locked\n");
# Maybe Lock() should do this?
$experiment->Refresh();
#
# XXX - At this point a failure is going to leave things in an
......
......@@ -833,6 +833,8 @@ $experiment->Lock($nextswapstate, 1) == 0
or tbdie({type => 'secondary', severity => SEV_SECONDARY,
error => ['set_experiment_state_failed', $nextswapstate]},
"Failed to set experiment state to $nextswapstate");
# Maybe Lock() should do this?
$experiment->Refresh();
#
# At this point, we need to force a cleanup no matter how we exit.
......
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