Commit a4573f71 authored by Leigh Stoller's avatar Leigh Stoller

Fix the prereserved feature generation in ptopgen, to add a 0 weight

feature on nodes that are prereserved to the same project as the
experiment, and add a 0.2 weight desire to the vtop file. Rob says it is
okay to always add this desire, so that is what I did.
parent be5d4d0f
......@@ -2367,6 +2367,9 @@ sub GenVirtNodes($)
if (defined($vnode->_startloc())) {
$desires->{"area-" . $vnode->_startloc()} = ['', 1.000000];
}
# Tell assign to favor nodes that are pre-reserved to the project.
$desires->{'prereserved'} = ['', 0.2];
# Require that this vnode be placed onto a pnode that supports
# the OS it is going to run. However, if the OS is one with a
# 'path' (like an OSKit kernel), we don't have an entry in
......
......@@ -1156,7 +1156,7 @@ while (($node,$type,$physnode,$class,$issubnode,$def_boot_osid,$reserved,
$storage_node{$node} = 1;
}
if (defined($prereserved) && !(defined($pid) && $prereserved eq $pid)) {
if (defined($prereserved) && (defined($pid) && $prereserved eq $pid)) {
$is_prereserved{$node} = $prereserved;
}
......@@ -1540,7 +1540,7 @@ foreach $node (@nodenames) {
}
if (exists($is_prereserved{$node})) {
push(@features,"prereserved:0.9");
push(@features,"prereserved:0");
}
# For robots, prefer ones that are already powered on and/or won't need to
......
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