Commit 090d50d3 authored by Timothy Stack's avatar Timothy Stack
Browse files

When an 'exempt' pid/eid was specified the reserved_pid condition was

lost.  Since the exempt eid is always given when doing a swap in, the
prereserve wasn't doing anything.
parent 552e6a1a
......@@ -320,16 +320,17 @@ my $free_condition = "(b.node_id is null and ".
" np.eventstate='" . TBDB_NODESTATE_POWEROFF . "' or ".
" np.eventstate='" . TBDB_NODESTATE_ALWAYSUP . "')) ";
if (defined($pid)) {
$free_condition = "($free_condition and ".
"(np.reserved_pid is null or np.reserved_pid='$pid'))";
# if the user has specified an exempt pid/eid,
# then view any node which is reserved to that experiment as available.
if (defined($exempt_eid)) {
$free_condition = "($free_condition or ".
"('$pid' and b.eid='$exempt_eid'))";
elsif (defined($pid)) {
$free_condition = "($free_condition and ".
"(np.reserved_pid is null or np.reserved_pid='$pid'))";
# If the user wants all nodes, we consider everything to be free (this
# overrides the other possible free conditions
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