Commit 2b3464c7 authored by Robert Ricci's avatar Robert Ricci

Put widearea nodes that are not 'up' in the ptop file, but mark them

with the 'down:1' feature, so that they won't normally get allocated.
parent 9bce44a2
......@@ -317,7 +317,8 @@ foreach $node (keys(%nodes)) {
#
if ($widearea) {
$result =
DBQueryFatal("select count(a.node_id),a.type,a.phys_nodeid,aa.type ".
DBQueryFatal("select count(a.node_id),a.type,a.phys_nodeid,aa.type, ".
" ns.status ".
" from nodes as a ".
"left join reserved as b on a.node_id=b.node_id ".
"left join nodes as aa on aa.node_id=a.phys_nodeid ".
......@@ -326,12 +327,11 @@ if ($widearea) {
" a.phys_nodeid=ns.node_id ".
"left join node_types as t on t.type=a.type ".
"where (a.role='virtnode' and t.isremotenode=1 and ".
" ns.status='up' and ".
" (b.node_id is null and ".
" !(m.pid='$DEADPID' and m.eid='$DEADEID'))) ".
"group by a.phys_nodeid");
while (($count,$type,$physnode,$ptype) = $result->fetchrow_array) {
while (($count,$type,$physnode,$ptype,$status) = $result->fetchrow_array) {
my @types;
my @features;
my @flags;
......@@ -345,6 +345,15 @@ if ($widearea) {
push(@types, "$classes{$type}:$virtnode_capacity");
}
#
# Mark any nodes that are not up with a feature, so that they won't
# normally get assigned. We want to include them, though, because we
# allow people to do fix-node to down nodes
#
if ($status && ($status ne 'up')) {
push @features, "down:1";
}
#
# Add any auxiliary types.
#
......
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