Commit f2e66802 authored by Leigh B Stoller's avatar Leigh B 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($$) ...@@ -495,7 +495,7 @@ sub WarnExpiring($$)
"and click on the Extend button.\n". "and click on the Extend button.\n".
"\n". "\n".
"Thanks!", "Thanks!",
$self->Brand()->OpsEmailAddress()); $self->Brand()->LogsEmailAddress());
return 0; return 0;
} }
......
...@@ -178,7 +178,9 @@ if (!defined($this_user) || !$this_user->IsAdmin()) { ...@@ -178,7 +178,9 @@ if (!defined($this_user) || !$this_user->IsAdmin()) {
# Email record. # Email record.
if (! $debug) { if (! $debug) {
AuditStart(0, undef, LIBAUDIT_LOGTBLOGS()|LIBAUDIT_LOGONLY()); 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. # Connect to the SA DB.
...@@ -555,6 +557,11 @@ elsif (!$localuser) { ...@@ -555,6 +557,11 @@ elsif (!$localuser) {
fatal("Project $pid does not exist"); 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. # There will be "internal" keys cause we pass the flag asking for them.
my @sshkeys; my @sshkeys;
if ($geniuser->GetKeyBundle(\@sshkeys, 1) < 0 || !@sshkeys) { if ($geniuser->GetKeyBundle(\@sshkeys, 1) < 0 || !@sshkeys) {
......
...@@ -751,7 +751,7 @@ sub PollDatasetStatus($$) ...@@ -751,7 +751,7 @@ sub PollDatasetStatus($$)
$project->SendEmail($this_user->email(), $project->SendEmail($this_user->email(),
"Your dataset is now ready to use", "Your dataset is now ready to use",
"Dataset '$dname' is now allocated and ready to use.\n", "Dataset '$dname' is now allocated and ready to use.\n",
$project->OpsEmailAddress(), undef, $logfile); $project->LogsEmailAddress(), undef, $logfile);
$webtask->Exited(0) $webtask->Exited(0)
if (defined($webtask)); if (defined($webtask));
last; last;
......
...@@ -552,12 +552,11 @@ sub DoSnapshot() ...@@ -552,12 +552,11 @@ sub DoSnapshot()
$slice->UnLock() $slice->UnLock()
if ($needunlock); if ($needunlock);
if (defined($logfile)) { if (defined($logfile)) {
$instance->Brand()->SendEmail($instance->Brand()->OpsEmailAddress(), SENDMAIL($TBOPS,
"Snapshot failed", "Snapshot failed",
"Error taking snapshot of $instance:\n\n". "Error taking snapshot of $instance:\n\n".
"$errmsg\n", "$errmsg\n",
$instance->Brand()->OpsEmailAddress(), $TBOPS, undef, $logfile);
undef, $logfile);
unlink($logfile); unlink($logfile);
} }
exit($errcode); exit($errcode);
...@@ -739,12 +738,11 @@ sub DoTerminate() ...@@ -739,12 +738,11 @@ sub DoTerminate()
$webtask->Exited(1); $webtask->Exited(1);
} }
if (defined($logfile)) { if (defined($logfile)) {
$instance->Brand()->SendEmail($instance->Brand()->OpsEmailAddress(), SENDMAIL($TBOPS,
"Unable to terminate instance $uuid", "Unable to terminate instance $uuid",
"Error terminating $instance:\n\n". "Error terminating $instance:\n\n".
"$errmsg\n", "$errmsg\n",
$instance->Brand()->OpsEmailAddress(), $TBOPS, undef, $logfile);
undef, $logfile);
unlink($logfile); unlink($logfile);
} }
exit(1); exit(1);
......
...@@ -529,8 +529,7 @@ $project->SendEmail($portalLogs, "New Profile Created", ...@@ -529,8 +529,7 @@ $project->SendEmail($portalLogs, "New Profile Created",
"Project: ". $profile->pid() . "Project: ". $profile->pid() .
" (" . $project->Brand()->brand() . ")\n". " (" . $project->Brand()->brand() . ")\n".
"UUID: ". $profile->uuid() . "\n". "UUID: ". $profile->uuid() . "\n".
"URL: ". $profile->AdminURL() . "\n", "URL: ". $profile->AdminURL() . "\n");
$TBOPS);
exit(0); exit(0);
......
#!/usr/bin/perl -wT #!/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 # {{{EMULAB-LICENSE
# #
...@@ -36,6 +36,7 @@ use libtestbed; ...@@ -36,6 +36,7 @@ use libtestbed;
# Configure variables # Configure variables
my $TB = "@prefix@"; my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@"; my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@";
my $TBAPPROVAL = "@TBAPPROVALEMAIL@"; my $TBAPPROVAL = "@TBAPPROVALEMAIL@";
my $TBAUDIT = "@TBAUDITEMAIL@"; my $TBAUDIT = "@TBAUDITEMAIL@";
my $TBBASE = "@TBBASE@"; my $TBBASE = "@TBBASE@";
...@@ -90,11 +91,20 @@ sub OpsEmailAddress($) ...@@ -90,11 +91,20 @@ sub OpsEmailAddress($)
{ {
my ($self) = @_; my ($self) = @_;
return ($self->isAPT() ? "aptlab-ops\@aptlab.net" : return ($self->isAPT() ? "portal-ops\@aptlab.net" :
$self->isCloud() ? "cloudlab-ops\@cloudlab.us" : $self->isCloud() ? "portal-ops\@cloudlab.us" :
$TBOPS); $TBOPS);
} }
sub LogsEmailAddress($)
{
my ($self) = @_;
return ($self->isAPT() ? "apt-logs\@aptlab.net" :
$self->isCloud() ? "cloudlab-logs\@cloudlab.us" :
$TBLOGS);
}
sub EmailTag($) sub EmailTag($)
{ {
my ($self) = @_; my ($self) = @_;
...@@ -114,6 +124,24 @@ sub SignupURL($$) ...@@ -114,6 +124,24 @@ sub SignupURL($$)
"${wwwbase}/joinproject.php3?target_pid=$pid"); "${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. # So we can localize MAILTAG variable.
sub SendEmail($$$$;$$@) sub SendEmail($$$$;$$@)
{ {
......
...@@ -1009,7 +1009,10 @@ sub SendApprovalEmail($$$) ...@@ -1009,7 +1009,10 @@ sub SendApprovalEmail($$$)
my $subject = "Membership Approved in '$pid/$gid'"; my $subject = "Membership Approved in '$pid/$gid'";
if ($project->isAPT() || $project->isCloud()) { 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"; $subject = "Membership Approved in Project $pid";
} }
else { else {
......
...@@ -159,6 +159,7 @@ sub unix_name($) { return $_[0]->{'GROUP'}->unix_name(); } ...@@ -159,6 +159,7 @@ sub unix_name($) { return $_[0]->{'GROUP'}->unix_name(); }
# Branding. # Branding.
sub ApprovalEmailAddress($) { return $_[0]->Brand()->ApprovalEmailAddress(); } sub ApprovalEmailAddress($) { return $_[0]->Brand()->ApprovalEmailAddress(); }
sub OpsEmailAddress($) { return $_[0]->Brand()->OpsEmailAddress(); } sub OpsEmailAddress($) { return $_[0]->Brand()->OpsEmailAddress(); }
sub LogsEmailAddress($) { return $_[0]->Brand()->LogsEmailAddress(); }
sub EmailTag($) { return $_[0]->Brand()->EmailTag(); } sub EmailTag($) { return $_[0]->Brand()->EmailTag(); }
sub wwwBase($) { return $_[0]->Brand()->wwwBase(); } sub wwwBase($) { return $_[0]->Brand()->wwwBase(); }
sub SignupURL($) { return $_[0]->Brand()->SignupURL($_[0]); } sub SignupURL($) { return $_[0]->Brand()->SignupURL($_[0]); }
......
...@@ -75,7 +75,7 @@ if ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.aptlab.net") { ...@@ -75,7 +75,7 @@ if ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.aptlab.net") {
$APTHOST = "www.aptlab.net"; $APTHOST = "www.aptlab.net";
$WWWHOST = "www.aptlab.net"; $WWWHOST = "www.aptlab.net";
$APTBASE = "https://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'; $GOOGLEUA = 'UA-42844769-3';
$TBMAILTAG = "aptlab.net"; $TBMAILTAG = "aptlab.net";
# For devel trees # For devel trees
...@@ -90,7 +90,7 @@ elseif (0 || ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.cloudlab.us")) { ...@@ -90,7 +90,7 @@ elseif (0 || ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.cloudlab.us")) {
$APTHOST = "www.cloudlab.us"; $APTHOST = "www.cloudlab.us";
$WWWHOST = "www.cloudlab.us"; $WWWHOST = "www.cloudlab.us";
$APTBASE = "https://www.cloudlab.us"; $APTBASE = "https://www.cloudlab.us";
$APTMAIL = "CloudLab Operations <cloudlab-ops@cloudlab.us>"; $APTMAIL = "CloudLab Operations <portal-ops@cloudlab.us>";
$APTTITLE = "CloudLab"; $APTTITLE = "CloudLab";
$FAVICON = "cloudlab.ico"; $FAVICON = "cloudlab.ico";
$APTLOGO = "cloudlogo.png"; $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