Commit e3877b94 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix issue #13 (Improve logging email for Apt/CloudLab instantiations).

parent cc4d9597
...@@ -56,6 +56,7 @@ my $localuser = 0; ...@@ -56,6 +56,7 @@ my $localuser = 0;
my $quickuuid; my $quickuuid;
my $aggregate; my $aggregate;
my $this_user; my $this_user;
my $xmlparse;
# Protos # Protos
sub fatal($); sub fatal($);
...@@ -231,14 +232,12 @@ if (!defined($cm_authority)) { ...@@ -231,14 +232,12 @@ if (!defined($cm_authority)) {
# #
# Must wrap the parser in eval since it exits on error. # Must wrap the parser in eval since it exits on error.
# #
my $xmlparse = eval { XMLin($xmlfile, $xmlparse = eval { XMLin($xmlfile,
VarAttr => 'name', VarAttr => 'name',
ContentKey => '-content', ContentKey => '-content',
SuppressEmpty => undef); }; SuppressEmpty => undef); };
fatal($@) fatal($@)
if ($@); if ($@);
print STDERR Dumper($xmlparse)
if ($debug || $verbose);
# #
# Make sure all the required arguments were provided. # Make sure all the required arguments were provided.
...@@ -481,9 +480,11 @@ my $slice_hrn = "${PGENIDOMAIN}.${slice_id}"; ...@@ -481,9 +480,11 @@ my $slice_hrn = "${PGENIDOMAIN}.${slice_id}";
my $SERVER_NAME = (exists($ENV{"SERVER_NAME"}) ? $ENV{"SERVER_NAME"} : ""); my $SERVER_NAME = (exists($ENV{"SERVER_NAME"}) ? $ENV{"SERVER_NAME"} : "");
print STDERR "\n"; print STDERR "\n";
print STDERR "$user_urn\n"; print STDERR "User: $user_urn\n";
print STDERR "$slice_urn\n"; print STDERR "Email: $user_email" . (!$localuser ? " (guest)" : "") . "\n";
print STDERR "$SERVER_NAME\n"; print STDERR "Profile: " . $profile_object->name() . ":${version}\n";
print STDERR "Slice: $slice_urn\n";
print STDERR "Server: $SERVER_NAME\n";
print STDERR "\n"; print STDERR "\n";
print STDERR "$rspecstr\n"; print STDERR "$rspecstr\n";
...@@ -700,6 +701,9 @@ exit(0); ...@@ -700,6 +701,9 @@ exit(0);
sub fatal($) { sub fatal($) {
my ($mesg) = $_[0]; my ($mesg) = $_[0];
print STDERR Dumper($xmlparse)
if (defined($xmlparse));
print STDERR "*** $0:\n". print STDERR "*** $0:\n".
" $mesg\n"; " $mesg\n";
exit(-1); exit(-1);
......
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