From: Eugene Nikanorov Date: Sat, 27 Apr 2013 16:43:13 +0000 (+0400) Subject: Fix logic issue in OVSQuantumAgent.port_unbound method X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7dddca7ebd04d400436c3124220c0602a9a13482;p=openstack-build%2Fneutron-build.git Fix logic issue in OVSQuantumAgent.port_unbound method Fixes bug 1173463 Change-Id: If2978fc4c38304667f6910085cb220491d236a11 --- diff --git a/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py b/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py index e36993455..91dcda1f6 100644 --- a/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py +++ b/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py @@ -472,13 +472,11 @@ class OVSQuantumAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin): net_uuid) return lvm = self.local_vlan_map[net_uuid] - if lvm.network_type == 'gre': - if self.enable_tunneling: + if vif_id in lvm.vif_ports: + if lvm.network_type == 'gre' and self.enable_tunneling: # remove inbound unicast flow self.tun_br.delete_flows(tun_id=lvm.segmentation_id, dl_dst=lvm.vif_ports[vif_id].vif_mac) - - if vif_id in lvm.vif_ports: del lvm.vif_ports[vif_id] else: LOG.info(_('port_unbound: vif_id %s not in local_vlan_map'),