Skip to content
GitLab
Menu
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
a74018b5
Commit
a74018b5
authored
Aug 03, 2007
by
Russ Fish
Browse files
Report the current state when complaining that an experiment isn't active.
parent
bb5d74fd
Changes
4
Show whitespace changes
Inline
Side-by-side
tbsetup/eventsys_control.in
View file @
a74018b5
...
...
@@ -150,7 +150,7 @@ if ($expstate ne EXPTSTATE_ACTIVE &&
$expstate
ne
EXPTSTATE_ACTIVATING
&&
$expstate
ne
EXPTSTATE_MODIFY_RESWAP
&&
$expstate
ne
EXPTSTATE_SWAPPING
)
{
tbdie
("
$experiment
must be active (or swapping)!
");
tbdie
("
$experiment
must be active (or swapping)
, not
$expstate
!
");
}
#
...
...
tbsetup/node_update.in
View file @
a74018b5
...
...
@@ -117,7 +117,7 @@ if (! defined($experiment)) {
# Check state. Only ACTIVE experiments.
#
if
(
$experiment
->
state
()
ne
EXPTSTATE_ACTIVE
)
{
print
STDERR
"
Experiment
$pid
/
$eid
is not ACTIVE!
\n
";
print
STDERR
"
Experiment
$pid
/
$eid
is
in state
$estate
,
not ACTIVE!
\n
";
# For web page.
exit
(
1
);
}
...
...
www/linktest.php3
View file @
a74018b5
...
...
@@ -61,10 +61,12 @@ function CHECKPAGEARGS() {
USERERROR
(
"You do not have permission to start/stop linktest "
.
"on
$pid
/
$eid
!"
,
1
);
}
if
(
$experiment
->
state
()
!=
$TB_EXPTSTATE_ACTIVE
&&
$experiment
->
state
()
!=
$TB_EXPTSTATE_ACTIVATING
&&
$experiment
->
state
()
!=
$TB_EXPTSTATE_MODIFY_RESWAP
)
{
USERERROR
(
"Experiment
$eid
must be active to start/stop linktest!"
,
1
);
$expstate
=
$experiment
->
state
();
if
(
$expstate
!=
$TB_EXPTSTATE_ACTIVE
&&
$expstate
!=
$TB_EXPTSTATE_ACTIVATING
&&
$expstate
!=
$TB_EXPTSTATE_MODIFY_RESWAP
)
{
USERERROR
(
"Experiment
$eid
must be active to start/stop linktest,"
.
" not
$expstate
!"
,
1
);
}
$pid
=
$experiment
->
pid
();
$eid
=
$experiment
->
eid
();
...
...
www/replayexp.php3
View file @
a74018b5
...
...
@@ -80,8 +80,20 @@ set_time_limit(0);
STARTBUSY
(
"Starting event replay"
);
$retval
=
SUEXEC
(
$uid
,
"
$pid
,
$unix_gid
"
,
"webeventsys_control replay
$pid
,
$eid
"
,
SUEXEC_ACTION_DIE
);
STOPBUSY
();
SUEXEC_ACTION_IGNORE
);
CLEARBUSY
();
#
# Fatal Error. Report to the user, even though there is not much he can
# do with the error. Also reports to tbops.
#
if
(
$retval
<
0
)
{
SUEXECERROR
(
SUEXEC_ACTION_DIE
);
#
# Never returns ...
#
die
(
""
);
}
echo
"Events for your experiment are now being replayed.
\n
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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