Commit 66a7b035 authored by Robert Ricci's avatar Robert Ricci

Don't include nodes allocated to emulab-ops when counting the number

of nodes an OS is running on - this way, we don't count, for example,
nodes that a reloading.
parent 9c0a970f
......@@ -1805,8 +1805,9 @@ sub TBOSCountInstances ($;@)
$nodelist = "0";
}
my $query_result = DBQueryFatal("select distinct node_id from partitions " .
"where osid='$osid' and !($nodelist)");
my $query_result = DBQueryFatal("select distinct p.node_id from partitions " .
"as p left join reserved as r on p.node_id = r.node_id "
"where osid='$osid' and !($nodelist) and r.pid != '$TBOPSPID'");
my $current_count = $query_result->num_rows();
return $current_count;
......
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