Commit 2e4b033d authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Tweak to error handling when we cannot get the max extension for

an experiment from the cluster (say, cause its offline).
parent 6f79ee64
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# Copyright (c) 2000-2017 University of Utah and the Flux Group. # Copyright (c) 2000-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -2094,6 +2094,7 @@ sub DoMaxExtension() ...@@ -2094,6 +2094,7 @@ sub DoMaxExtension()
} }
exit(0); exit(0);
bad: bad:
print STDERR "$errmsg\n" if (defined($errmsg));
if (defined($webtask)) { if (defined($webtask)) {
$webtask->output($errmsg) if (defined($errmsg)); $webtask->output($errmsg) if (defined($errmsg));
$webtask->Exited($errcode); $webtask->Exited($errcode);
...@@ -2125,7 +2126,7 @@ sub DoMaxExtensionInternal($$$) ...@@ -2125,7 +2126,7 @@ sub DoMaxExtensionInternal($$$)
} }
my $errcode = CallAggregateMethod("MaxExtension", \$maxinfo, @aggregates); my $errcode = CallAggregateMethod("MaxExtension", \$maxinfo, @aggregates);
if ($errcode) { if ($errcode) {
$errmsg = $maxinfo; $$prval = $maxinfo;
goto bad; goto bad;
} }
# Process the max extension from each aggregate # Process the max extension from each aggregate
......
Supports Markdown
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