Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
e4cff23b
Commit
e4cff23b
authored
Feb 01, 2016
by
Leigh B Stoller
Browse files
Minor fix for node specific pre-reserve requests.
parent
efdd2de0
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/Node.pm.in
View file @
e4cff23b
...
...
@@ -3721,10 +3721,31 @@ sub CheckPreReserve($$)
#
my
$
noderes_result
=
DBQueryWarn
(
"select node_id from node_reservations "
.
"where
node_id='$node_id' and
pid='$pid'"
);
"where pid='$pid'"
);
goto
done
if
(
!$noderes_result);
#
#
Note
that
if
there
any
entries
in
the
node_reservations
table
,
#
then
only
those
specific
nodes
can
fulfill
the
request
.
Search
#
the
list
for
the
node_id
we
are
freeing
.
#
if
($
noderes_result
->
numrows
)
{
my
$
okay
=
0
;
while
(
my
($
id
)
=
$
noderes_result
->
fetchrow_array
())
{
if
($
node_id
eq
$
id
)
{
$
okay
=
1
;
last
;
}
}
#
#
XXX
We
should
look
for
another
reservation
to
fulfill
.
#
goto
done
if
(
!$okay);
}
if
(
DBQueryWarn
(
"update nodes set reserved_pid='$pid' "
.
"where node_id='$node_id'"
))
{
...
...
Write
Preview
Supports
Markdown
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