Commit 033f4874 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Bug fix for the case that a lannode wants to be on a shared node.

Need to add a desire on the lannode that says it is okay to put
it on a shared node, otherwise it gets a desires violation even though
it maps okay.

Thanks to Rob for figuring this out!
parent 6d1e0af2
......@@ -3065,17 +3065,25 @@ sub GenVirtLans($)
}
}
elsif ($#members != 0) {
my $desires = {};
$self->exptstats()->{"lans"} += 1;
my $lannode = ($vlan->_geninodes() ? "lan-$vname" : "lan/$vname");
my $cmurn = ($vlan->_geninodes() ?
$members[0]->virt_nodes()->_cmurn() : $mycmurn);
#
# This is for mixing real nodes with pnodes in a lan. The goal
# is to prevent assign from putting the lan node on a pc;
# always prefer a real switch. See corresponding change in
# ptopgen.
my $desires = ($virtnodes && $nonvirtnodes ?
{"real-switch" => ['' , "1.0"]} : undef);
#
if ($virtnodes && $nonvirtnodes) {
$desires->{"real-switch"} = ['' , "1.0"];
}
# This allows the lan node to go on a shared node.
if ($sharednodes) {
$desires->{"pcshared"} = ['' , "0.0"];
}
# Lan node for assign.
$self->createNode($lannode, $cmurn, "lan", '1', $desires,
......
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