Commit 8fd99238 authored by Shashi Guruprasad's avatar Shashi Guruprasad
Browse files

Fix. If both jail vnodes and sim nodes were present, the cpu/ram info

was getting added twice with my previous commit.
parent 481bf445
......@@ -323,6 +323,7 @@ foreach $node (keys(%nodes)) {
push(@types, $auxinfo);
}
my $cpu_ram_features_present = 0;
#
# This stuff is extra goo for local virtual nodes.
#
......@@ -331,8 +332,7 @@ foreach $node (keys(%nodes)) {
# Add trivial bw spec.
push @flags, "trivial_bw:400000";
# Add CPU and RAM information
push @features, "?+cpu:$cpu_speed";
push @features, "?+ram:$ram";
$cpu_ram_features_present++;
# This number can be use for fine-tuning packing
push @features, "?+virtpercent:100";
# Put this silly feature in so that we can try to keep vnodes
......@@ -351,12 +351,16 @@ foreach $node (keys(%nodes)) {
push @types, "sim:$simnode_capacity";
}
# Add CPU and RAM information
push @features, "?+cpu:$cpu_speed";
push @features, "?+ram:$ram";
$cpu_ram_features_present++;
push @types, "*lan:*";
# Add trivial bw spec.
push @flags, "trivial_bw:100000";
}
if ($cpu_ram_features_present) {
# Add CPU and RAM information
push @features, "?+cpu:$cpu_speed";
push @features, "?+ram:$ram";
}
# Add features
push(@features, @{$typemap{$type}->{'FEATURES'}});
......
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