Commit 1ada7631 authored by Leigh B Stoller's avatar Leigh B Stoller

Change how we determine the set of stale trunked ports, since

with shared vlans, using the reserved table in a join does not
get the ones we need.
parent 0843a736
......@@ -391,21 +391,20 @@ sub getExperimentCurrentTrunks($$@) {
# current experiment, but are setup in the context of a
# different experiment. Needs more thought though.
my @vlanports = getVlanPorts(@vlans);
my %vlanports = ();
foreach my $port (@vlanports) {
$vlanports{$port->toIfaceString()} = $port;
foreach my $vlanid (@vlans) {
my @vlanports = getExperimentVlanPorts($vlanid);
my $query_result =
DBQueryFatal("select distinct r.node_id,i.iface from reserved as r " .
"left join interface_state as i on i.node_id=r.node_id " .
"where'$pid' and r.eid='$eid' and " .
" i.tagged!=0");
while (my ($node, $iface) = $query_result->fetchrow()) {
if (exists($vlanports{"$node:$iface"})) {
push(@ports, $vlanports{"$node:$iface"});
foreach my $port (@vlanports) {
my $node_id = $port->node_id();
my $iface = $port->iface();
my $query_result =
DBQueryFatal("select tagged from interface_state ".
"where node_id='$node_id' and iface='$iface' and ".
" tagged!=0");
push(@ports, $port)
if ($query_result->numrows);
return @ports;
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