All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

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

Ensure that we flip back to the geniuser after the method invocation;

the callee might have switched to another user.
parent 19eca97d
......@@ -56,6 +56,7 @@ use lib '@prefix@/lib';
use Genixmlrpc;
use GeniResponse;
use GeniHRN;
use GeniUtil;
use libaudit;
use libEmulab;
use libtestbed;
......@@ -351,6 +352,9 @@ if ($MODULE eq "cm" || $MODULE eq $AM_MODULE) {
my $starttime = [gettimeofday()];
eval { $result = &{ $GENI_METHODS->{$method} }(@{ $call->{'value'} }) };
if ($@) {
# In case the callee flipped.
GeniUtil::FlipToGeniUser();
#
# These errors should get mailed to tbops.
#
......@@ -363,6 +367,9 @@ if ($@) {
"Error executing RPC:\n" . $@ . "\n\n" . $request);
}
else {
# In case the callee flipped.
GeniUtil::FlipToGeniUser();
my $elapsed = tv_interval($starttime);
$message .= "End: " . TBTimeStamp() . "\n";
$message .= "Elapsed: " . sprintf("%f", $elapsed) . "\n";
......
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