Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
10f4e432
Commit
10f4e432
authored
Jan 07, 2017
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-entrancy fix for multiple invocations from the mapper in its loop.
parent
edde5522
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
db/libadminctrl.pm.in
db/libadminctrl.pm.in
+24
-13
No files found.
db/libadminctrl.pm.in
View file @
10f4e432
#
!/usr/bin/perl -w
#
#
Copyright
(
c
)
2000
-
201
6
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2000
-
201
7
University
of
Utah
and
the
Flux
Group
.
#
#
{{{
EMULAB
-
LICENSE
#
...
...
@@ -246,18 +246,7 @@ my $PLUS_GIDIDX = 999999;
#
#
The
current
usage
data
structure
,
filled
in
below
.
#
my
%
curusage
=
(
"experiments"
=>
{
"user"
=>
0
,
"project"
=>
0
,
"group"
=>
0
},
"nodes"
=>
{
"user"
=>
0
,
"project"
=>
0
,
"group"
=>
0
,
"expt"
=>
0
},
#
Arrays
of
user
/
project
/
group
counts
,
indexed
by
type
and
class
.
"class"
=>
{},
"type"
=>
{},
);
my
%
curusage
=
();
#
Output
useful
info
.
sub
Declare
($)
...
...
@@ -277,6 +266,27 @@ sub Debug($)
}
}
#
We
can
call
this
mulitple
times
from
the
mapper
,
need
to
make
#
sure
global
state
is
clean
.
sub
InitVars
()
{
%
assign_classes
=
();
%
curusage
=
(
"experiments"
=>
{
"user"
=>
0
,
"project"
=>
0
,
"group"
=>
0
},
"nodes"
=>
{
"user"
=>
0
,
"project"
=>
0
,
"group"
=>
0
,
"expt"
=>
0
},
#
Arrays
of
user
/
project
/
group
counts
,
indexed
by
#
type
and
class
.
"class"
=>
{},
"type"
=>
{},
);
}
InitVars
();
#
Update
assign
number
.
sub
UpdateForAssign
($$$$)
{
...
...
@@ -1079,6 +1089,7 @@ sub TBAdmissionControlCheck($$$)
{
my
($
user
,
$
experiment
,
$
ptypearray
)
=
@
_
;
my
$
gid
=
$
experiment
->
gid
();
InitVars
();
$
assignflag
=
1
if
(
defined
($
ptypearray
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment