Experiment ". "$exp_pid/". "$exp_eid". "\n"; # A locked down experiment means just that! if ($lockdown) { echo "

\n"; USERERROR("Cannot proceed; the experiment is locked down!", 1); } # # We run this twice. The first time we are checking for a confirmation # by putting up a form. The next time through the confirmation will be # set. Or, the user can hit the cancel button, in which case redirect the # browser back up a level. # if (!$confirmed) { echo "

Are you REALLY sure you want to terminate Experiment '$exp_eid?' \n"; echo "
(This will completely destroy all trace of the experiment)

\n"; SHOWEXP($exp_pid, $exp_eid, 1); echo "
"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; PAGEFOOTER(); return; } # # We need the unix gid for the project for running the scripts below. # Note usage of default group in project. # TBGroupUnixInfo($exp_pid, $exp_gid, $unix_gid, $unix_name); # # We run a wrapper script that does all the work of terminating the # experiment. # # tbstopit # echo "

"; echo "

Starting experiment termination. Please wait a moment ...

"; flush(); # # Run the backend script. # $retval = SUEXEC($uid, "$exp_pid,$unix_gid", "webendexp $exp_pid $exp_eid", SUEXEC_ACTION_IGNORE); # # 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(""); } # # Exit status >0 means the operation could not proceed. # Exit status =0 means the experiment is terminating in the background. # echo "
\n"; if ($retval) { echo "

Experiment termination could not proceed

"; echo "
$suexec_output
"; } else { echo "

Your experiment is terminating!


You will be notified via email when the experiment has been torn down, and you can reuse the experiment name. This typically takes less than two minutes, depending on the number of nodes in the experiment. If you do not receive email notification within a reasonable amount of time, please contact $TBMAILADDR.\n"; echo "

If you are the morbid type, you can watch the experiment die in realtime.\n"; } # # Standard Testbed Footer # PAGEFOOTER(); ?>