Commit f2e66802 authored by Leigh Stoller's avatar Leigh Stoller

Various email address changes. Use portal-ops@cloudlab.us and @aptlab.net

instead of cloudlab-ops, which we want to use for the combined cluster
email list. Send more email to logs instead of ops, now that we are
generating enough of it.
parent dd868c8d
......@@ -495,7 +495,7 @@ sub WarnExpiring($$)
"and click on the Extend button.\n".
"\n".
"Thanks!",
$self->Brand()->OpsEmailAddress());
$self->Brand()->LogsEmailAddress());
return 0;
}
......
......@@ -178,7 +178,9 @@ if (!defined($this_user) || !$this_user->IsAdmin()) {
# Email record.
if (! $debug) {
AuditStart(0, undef, LIBAUDIT_LOGTBLOGS()|LIBAUDIT_LOGONLY());
AddAuditInfo("cc", "aptnet-logs\@flux.utah.edu");
#
# Once we determine the project, we can add the appropriate log CC
#
}
# Connect to the SA DB.
......@@ -555,6 +557,11 @@ elsif (!$localuser) {
fatal("Project $pid does not exist");
}
}
#
# Now we know where to send to logs.
#
AddAuditInfo("cc", $project->LogsEmailAddress());
# There will be "internal" keys cause we pass the flag asking for them.
my @sshkeys;
if ($geniuser->GetKeyBundle(\@sshkeys, 1) < 0 || !@sshkeys) {
......
......@@ -751,7 +751,7 @@ sub PollDatasetStatus($$)
$project->SendEmail($this_user->email(),
"Your dataset is now ready to use",
"Dataset '$dname' is now allocated and ready to use.\n",
$project->OpsEmailAddress(), undef, $logfile);
$project->LogsEmailAddress(), undef, $logfile);
$webtask->Exited(0)
if (defined($webtask));
last;
......
......@@ -552,12 +552,11 @@ sub DoSnapshot()
$slice->UnLock()
if ($needunlock);
if (defined($logfile)) {
$instance->Brand()->SendEmail($instance->Brand()->OpsEmailAddress(),
"Snapshot failed",
"Error taking snapshot of $instance:\n\n".
"$errmsg\n",
$instance->Brand()->OpsEmailAddress(),
undef, $logfile);
SENDMAIL($TBOPS,
"Snapshot failed",
"Error taking snapshot of $instance:\n\n".
"$errmsg\n",
$TBOPS, undef, $logfile);
unlink($logfile);
}
exit($errcode);
......@@ -739,12 +738,11 @@ sub DoTerminate()
$webtask->Exited(1);
}
if (defined($logfile)) {
$instance->Brand()->SendEmail($instance->Brand()->OpsEmailAddress(),
"Unable to terminate instance $uuid",
"Error terminating $instance:\n\n".
"$errmsg\n",
$instance->Brand()->OpsEmailAddress(),
undef, $logfile);
SENDMAIL($TBOPS,
"Unable to terminate instance $uuid",
"Error terminating $instance:\n\n".
"$errmsg\n",
$TBOPS, undef, $logfile);
unlink($logfile);
}
exit(1);
......
......@@ -529,8 +529,7 @@ $project->SendEmail($portalLogs, "New Profile Created",
"Project: ". $profile->pid() .
" (" . $project->Brand()->brand() . ")\n".
"UUID: ". $profile->uuid() . "\n".
"URL: ". $profile->AdminURL() . "\n",
$TBOPS);
"URL: ". $profile->AdminURL() . "\n");
exit(0);
......
#!/usr/bin/perl -wT
#
# Copyright (c) 2005-2014 University of Utah and the Flux Group.
# Copyright (c) 2005-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -36,6 +36,7 @@ use libtestbed;
# Configure variables
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@";
my $TBAPPROVAL = "@TBAPPROVALEMAIL@";
my $TBAUDIT = "@TBAUDITEMAIL@";
my $TBBASE = "@TBBASE@";
......@@ -90,11 +91,20 @@ sub OpsEmailAddress($)
{
my ($self) = @_;
return ($self->isAPT() ? "aptlab-ops\@aptlab.net" :
$self->isCloud() ? "cloudlab-ops\@cloudlab.us" :
return ($self->isAPT() ? "portal-ops\@aptlab.net" :
$self->isCloud() ? "portal-ops\@cloudlab.us" :
$TBOPS);
}
sub LogsEmailAddress($)
{
my ($self) = @_;
return ($self->isAPT() ? "apt-logs\@aptlab.net" :
$self->isCloud() ? "cloudlab-logs\@cloudlab.us" :
$TBLOGS);
}
sub EmailTag($)
{
my ($self) = @_;
......@@ -114,6 +124,24 @@ sub SignupURL($$)
"${wwwbase}/joinproject.php3?target_pid=$pid");
}
sub UsersGroupName($)
{
my ($self) = @_;
return ($self->isAPT() || $self->isCloud() ?
"apt-users\@googlegroups.com" :
"cloudlab-users\@googlegroups.com");
}
sub UsersGroupURL($)
{
my ($self) = @_;
my $url = 'https://groups.google.com/forum/#!forum/';
return ($self->isAPT() || $self->isCloud() ?
"$url/apt-users" : "$url/cloudlab-users");
}
# So we can localize MAILTAG variable.
sub SendEmail($$$$;$$@)
{
......
......@@ -1009,7 +1009,10 @@ sub SendApprovalEmail($$$)
my $subject = "Membership Approved in '$pid/$gid'";
if ($project->isAPT() || $project->isCloud()) {
$message .= "project $pid.";
my $helpurl = $project->Brand()->UsersGroupURL();
$message .= "project $pid.\n\n";
$message .= "Please be sure to join the Help Forum at $helpurl";
$subject = "Membership Approved in Project $pid";
}
else {
......
......@@ -159,6 +159,7 @@ sub unix_name($) { return $_[0]->{'GROUP'}->unix_name(); }
# Branding.
sub ApprovalEmailAddress($) { return $_[0]->Brand()->ApprovalEmailAddress(); }
sub OpsEmailAddress($) { return $_[0]->Brand()->OpsEmailAddress(); }
sub LogsEmailAddress($) { return $_[0]->Brand()->LogsEmailAddress(); }
sub EmailTag($) { return $_[0]->Brand()->EmailTag(); }
sub wwwBase($) { return $_[0]->Brand()->wwwBase(); }
sub SignupURL($) { return $_[0]->Brand()->SignupURL($_[0]); }
......
......@@ -75,7 +75,7 @@ if ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.aptlab.net") {
$APTHOST = "www.aptlab.net";
$WWWHOST = "www.aptlab.net";
$APTBASE = "https://www.aptlab.net";
$APTMAIL = "APT Operations <aptlab-ops@aptlab.net>";
$APTMAIL = "APT Operations <portal-ops@aptlab.net>";
$GOOGLEUA = 'UA-42844769-3';
$TBMAILTAG = "aptlab.net";
# For devel trees
......@@ -90,7 +90,7 @@ elseif (0 || ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.cloudlab.us")) {
$APTHOST = "www.cloudlab.us";
$WWWHOST = "www.cloudlab.us";
$APTBASE = "https://www.cloudlab.us";
$APTMAIL = "CloudLab Operations <cloudlab-ops@cloudlab.us>";
$APTMAIL = "CloudLab Operations <portal-ops@cloudlab.us>";
$APTTITLE = "CloudLab";
$FAVICON = "cloudlab.ico";
$APTLOGO = "cloudlogo.png";
......
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