Commit 9555e3e0 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Ar per Jay's request, change the email text to point to the batch

system as well as the summary page.
parent d7780943
...@@ -65,6 +65,8 @@ my $PROJROOT = "/proj"; ...@@ -65,6 +65,8 @@ my $PROJROOT = "/proj";
my $EVENTSYS = @EVENTSYS@; my $EVENTSYS = @EVENTSYS@;
my $TBOPS = "@TBOPSEMAIL@"; my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@"; my $TBLOGS = "@TBLOGSEMAIL@";
my $TBDOCBASE = "@TBDOCBASE@";
my $TBBASE = "@TBBASE@";
# #
# Testbed Support libraries # Testbed Support libraries
...@@ -274,7 +276,7 @@ if (! DBQueryWarn("insert into experiment_resources (idx, tstamp, exptidx) ". ...@@ -274,7 +276,7 @@ if (! DBQueryWarn("insert into experiment_resources (idx, tstamp, exptidx) ".
"select 0, now(), idx from experiments ". "select 0, now(), idx from experiments ".
"where pid='$pid' and eid='$eid'")) { "where pid='$pid' and eid='$eid'")) {
DBQueryWarn("unlock tables"); DBQueryWarn("unlock tables");
fatal("DB error inserting experiment resources record for $pid/$eid!\n"); fatal("DB error inserting experiment resources record for $pid/$eid!");
} }
# #
...@@ -287,7 +289,7 @@ if (! DBQueryWarn("insert into experiment_stats ". ...@@ -287,7 +289,7 @@ if (! DBQueryWarn("insert into experiment_stats ".
"left join experiment_resources as r on e.idx=r.exptidx ". "left join experiment_resources as r on e.idx=r.exptidx ".
"where pid='$pid' and eid='$eid'")) { "where pid='$pid' and eid='$eid'")) {
DBQueryWarn("unlock tables"); DBQueryWarn("unlock tables");
fatal("DB error inserting experiment stats record for $pid/$eid!\n"); fatal("DB error inserting experiment stats record for $pid/$eid!");
} }
# #
...@@ -440,7 +442,7 @@ SetExpState($pid, $eid, EXPTSTATE_PRERUN); ...@@ -440,7 +442,7 @@ SetExpState($pid, $eid, EXPTSTATE_PRERUN);
print "Running 'tbprerun $pid $eid $nsfile'\n"; print "Running 'tbprerun $pid $eid $nsfile'\n";
if (system("$tbbindir/tbprerun $pid $eid $nsfile") != 0) { if (system("$tbbindir/tbprerun $pid $eid $nsfile") != 0) {
$errorstat = $? >> 8; $errorstat = $? >> 8;
fatal("tbprerun failed!\n"); fatal("tbprerun failed!");
} }
SetExpState($pid, $eid, EXPTSTATE_SWAPPED); SetExpState($pid, $eid, EXPTSTATE_SWAPPED);
...@@ -453,7 +455,7 @@ if (! ($frontend || $batchmode)) { ...@@ -453,7 +455,7 @@ if (! ($frontend || $batchmode)) {
print "Running 'tbswap in $pid $eid'\n"; print "Running 'tbswap in $pid $eid'\n";
if (system("$tbbindir/tbswap in $pid $eid") != 0) { if (system("$tbbindir/tbswap in $pid $eid") != 0) {
$errorstat = $? >> 8; $errorstat = $? >> 8;
fatal("tbswap in failed!\n"); fatal("tbswap in failed!");
} }
SetExpState($pid, $eid, EXPTSTATE_ACTIVE); SetExpState($pid, $eid, EXPTSTATE_ACTIVE);
...@@ -482,7 +484,7 @@ if (! ($frontend || $batchmode)) { ...@@ -482,7 +484,7 @@ if (! ($frontend || $batchmode)) {
# We append this report in the email message below. # We append this report in the email message below.
if (system("$tbbindir/tbreport -b $pid $eid 2>&1 > $repfile") != 0) { if (system("$tbbindir/tbreport -b $pid $eid 2>&1 > $repfile") != 0) {
fatal("tbreport failed!\n"); fatal("tbreport failed!");
} }
# #
...@@ -701,11 +703,21 @@ sub fatal($) ...@@ -701,11 +703,21 @@ sub fatal($)
# Send a message to the testbed list. # Send a message to the testbed list.
# #
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"Experiment Configure Failure: $pid/$eid", "Experiment Configure Failure: $pid/$eid",
$mesg, $mesg . "\n\n" .
"$user_name <$user_email>", "Please look at the log below to see what happened. If the error\n".
"Cc: $TBOPS", "resulted from a lack of free nodes, you can use this web page to\n".
($logname, "assign.log", "wanassign.log", $nsfile)); "get a summary of free nodes:\n\n".
" ${TBBASE}/nodecontrol_list.php3\n".
"\n".
"Please do not try again until you see enough nodes free. Or, you\n".
"can use the batch system to swap your experiment in when enough\n".
"nodes are free:\n\n".
" ${TBDOCBASE}/tutorial/docwrapper.php3?docname=tutorial.html".
"#BatchMode\n",
"$user_name <$user_email>",
"Cc: $TBOPS",
($logname, "assign.log", "wanassign.log", $nsfile));
# #
# Back up the work dir for post-mortem debugging. # Back up the work dir for post-mortem debugging.
......
...@@ -1029,18 +1029,22 @@ sub fatal($) ...@@ -1029,18 +1029,22 @@ sub fatal($)
# Send a message to the testbed list. Append the logfile. # Send a message to the testbed list. Append the logfile.
# #
SENDMAIL("$user_name <$user_email>", SENDMAIL("$user_name <$user_email>",
"Swap ${inout} Failure: $pid/$eid", "Swap ${inout} Failure: $pid/$eid",
$mesg . "\n\n" . $mesg . "\n\n" .
"Please look at the log below to see what happened. If the error\n". "Please look at the log below to see what happened. If the error\n".
"resulted from a lack of resources (not enough nodes), you can\n". "resulted from a lack of free nodes, you can use this web page to\n".
"use this web page to get a summary of free nodes:\n\n". "get a summary of free nodes:\n\n".
" ${TBBASE}/nodecontrol_list.php3\n". " ${TBBASE}/nodecontrol_list.php3\n".
"\n". "\n".
"Please do not try again until you see enough nodes free.", "Please do not try again until you see enough nodes free. Or, you\n".
($idleswap ? $TBOPS : "$user_name <$user_email>"), "can use the batch system to swap your experiment in when enough\n".
"Cc: $expt_head_name <$expt_head_email>\n". "nodes are free:\n\n".
"Cc: $TBOPS", " ${TBDOCBASE}/tutorial/docwrapper.php3?docname=tutorial.html".
(($logname), (defined($modnsfile) ? ($modnsfile) : ()))); "#BatchMode\n",
($idleswap ? $TBOPS : "$user_name <$user_email>"),
"Cc: $expt_head_name <$expt_head_email>\n".
"Cc: $TBOPS",
(($logname), (defined($modnsfile) ? ($modnsfile) : ())));
if ($modifyHosed) { if ($modifyHosed) {
# #
......
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