Commit 132e4c8d authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Trying to fix the problem with not being able to lookup a new

user right after create.
parent 4a8b2582
#!/usr/bin/perl -wT
#
# Copyright (c) 2008-2016 University of Utah and the Flux Group.
# Copyright (c) 2008-2017 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
......@@ -301,6 +301,12 @@ sub Flush($)
delete($users{$self->idx()});
}
sub FlushAll($)
{
my ($class) = @_;
%users = ();
}
# Return the URN.
#
......
......@@ -37,6 +37,7 @@ use vars qw(@ISA @EXPORT);
@EXPORT = qw(GENI_PURGEFLAG FindHostname FindVHostname);
use English;
use Carp;
use Data::Dumper;
use XML::Simple;
use File::Temp qw(tempfile);
......@@ -616,8 +617,11 @@ sub CreateLocalUser($$)
"Could not create local user")
}
FlipToGeniUser();
User->FlushAll();
GeniUser->FlushAll();
my $user = GeniUser->Lookup($urn, 1);
if (!defined($user)) {
Carp::cluck("Could not lookup '$urn' after creategeniuser");
return GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"Could not lookup local user after create")
}
......
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