Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
a74018b5
Commit
a74018b5
authored
Aug 03, 2007
by
Russ Fish
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report the current state when complaining that an experiment isn't active.
parent
bb5d74fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
8 deletions
+22
-8
tbsetup/eventsys_control.in
tbsetup/eventsys_control.in
+1
-1
tbsetup/node_update.in
tbsetup/node_update.in
+1
-1
www/linktest.php3
www/linktest.php3
+6
-4
www/replayexp.php3
www/replayexp.php3
+14
-2
No files found.
tbsetup/eventsys_control.in
View file @
a74018b5
...
@@ -150,7 +150,7 @@ if ($expstate ne EXPTSTATE_ACTIVE &&
...
@@ -150,7 +150,7 @@ if ($expstate ne EXPTSTATE_ACTIVE &&
$expstate
ne
EXPTSTATE_ACTIVATING
&&
$expstate
ne
EXPTSTATE_ACTIVATING
&&
$expstate
ne
EXPTSTATE_MODIFY_RESWAP
&&
$expstate
ne
EXPTSTATE_MODIFY_RESWAP
&&
$expstate
ne
EXPTSTATE_SWAPPING
)
{
$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)) {
...
@@ -117,7 +117,7 @@ if (! defined($experiment)) {
# Check state. Only ACTIVE experiments.
# Check state. Only ACTIVE experiments.
#
#
if
(
$experiment
->
state
()
ne
EXPTSTATE_ACTIVE
)
{
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.
# For web page.
exit
(
1
);
exit
(
1
);
}
}
...
...
www/linktest.php3
View file @
a74018b5
...
@@ -61,10 +61,12 @@ function CHECKPAGEARGS() {
...
@@ -61,10 +61,12 @@ function CHECKPAGEARGS() {
USERERROR
(
"You do not have permission to start/stop linktest "
.
USERERROR
(
"You do not have permission to start/stop linktest "
.
"on
$pid
/
$eid
!"
,
1
);
"on
$pid
/
$eid
!"
,
1
);
}
}
if
(
$experiment
->
state
()
!=
$TB_EXPTSTATE_ACTIVE
&&
$expstate
=
$experiment
->
state
();
$experiment
->
state
()
!=
$TB_EXPTSTATE_ACTIVATING
&&
if
(
$expstate
!=
$TB_EXPTSTATE_ACTIVE
&&
$experiment
->
state
()
!=
$TB_EXPTSTATE_MODIFY_RESWAP
)
{
$expstate
!=
$TB_EXPTSTATE_ACTIVATING
&&
USERERROR
(
"Experiment
$eid
must be active to start/stop linktest!"
,
1
);
$expstate
!=
$TB_EXPTSTATE_MODIFY_RESWAP
)
{
USERERROR
(
"Experiment
$eid
must be active to start/stop linktest,"
.
" not
$expstate
!"
,
1
);
}
}
$pid
=
$experiment
->
pid
();
$pid
=
$experiment
->
pid
();
$eid
=
$experiment
->
eid
();
$eid
=
$experiment
->
eid
();
...
...
www/replayexp.php3
View file @
a74018b5
...
@@ -80,8 +80,20 @@ set_time_limit(0);
...
@@ -80,8 +80,20 @@ set_time_limit(0);
STARTBUSY
(
"Starting event replay"
);
STARTBUSY
(
"Starting event replay"
);
$retval
=
SUEXEC
(
$uid
,
"
$pid
,
$unix_gid
"
,
$retval
=
SUEXEC
(
$uid
,
"
$pid
,
$unix_gid
"
,
"webeventsys_control replay
$pid
,
$eid
"
,
"webeventsys_control replay
$pid
,
$eid
"
,
SUEXEC_ACTION_DIE
);
SUEXEC_ACTION_IGNORE
);
STOPBUSY
();
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
"
;
echo
"Events for your experiment are now being replayed.
\n
"
;
...
...
Write
Preview
Markdown
is supported
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