Commit f2518d8d authored by Leigh Stoller's avatar Leigh Stoller

Minor fix for creating shared node pools; do not create an empty

vlan when there are no experimental interfaces, it confuses snmpit.
parent d718cbdd
......@@ -6291,6 +6291,10 @@ sub InterpLinks($)
$protovlan->SetEncapStyle("default");
# Total hack ... see snmpit.
$protovlan->SetAttribute("trunk_mode", "dual");
# Well, if there are no experimental interfaces, we want to kill
# the protovlan so that it does not confused snmpit.
my $iface_counter = 0;
foreach my $pnode (@sharedpnodes) {
my $pnodename = $pnode->node_id();
......@@ -6365,8 +6369,13 @@ sub InterpLinks($)
or return -1 if (!($self->impotent() ||
$self->alloconly()));
}
$iface_counter++;
}
}
if (!$iface_counter) {
$self->printdb("No interfaces in shared vlan, killing protovlan\n");
$protovlan->Destroy();
}
}
# Write the vlans to the DB.
......
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