Commit db2ab066 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

CC image email to local tbops so there is just one message,

and do not send it from create_image
parent a2691c6a
......@@ -2518,7 +2518,7 @@ sub CreateImage($)
# Do the snapshot.
#
$output =
GeniUtil::ExecQuiet("$CREATEIMAGE -f -p $pid $imagename $node_id");
GeniUtil::ExecQuiet("$CREATEIMAGE -e -f -p $pid $imagename $node_id");
# Not a typical op, so always print debugging info;
print STDERR $output;
if ($?) {
......@@ -2527,7 +2527,9 @@ sub CreateImage($)
if ($user->email()) {
libtestbed::SENDMAIL($user->email(),
"Failed to clone image",
"$output\n");
"$output\n",
$user->email(),
"Bcc: $TBOPS");
}
return -1;
}
......@@ -2538,7 +2540,9 @@ sub CreateImage($)
"Image URL: $image_url\n".
"\n".
"-----------------------------------------\n".
"$output\n");
"$output\n",
$user->email(),
"Bcc: $TBOPS");
}
$slice->UnLock();
return 0;
......
......@@ -67,11 +67,12 @@ sub usage()
"<node> - nodeid to create the image from\n");
exit(-1);
}
my $optlist = "p:wsNdf";
my $optlist = "p:wsNdfe";
my $waitmode = 0;
my $usessh = 0;
my $usenfs = 0;
my $usefup = 1;
my $usessh = 0;
my $usenfs = 0;
my $usefup = 1;
my $noemail = 0;
#
# Configure variables
......@@ -157,6 +158,9 @@ if (! getopts($optlist, \%options)) {
if (defined($options{"w"})) {
$waitmode = 1;
}
if (defined($options{"e"})) {
$noemail = 1;
}
if (defined($options{"s"})) {
$usessh = 1;
$usefup = $usenfs = 0;
......@@ -789,7 +793,7 @@ SENDMAIL("$user_name <$user_email>",
"$swmsg",
"$user_name <$user_email>",
"Bcc: $TBLOGS",
defined($logfile) ? ($logfile->filename()) : ());
defined($logfile) ? ($logfile->filename()) : ()) if (!$noemail);
if (defined($logfile)) {
# Close up the log file so the webpage stops.
......
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