ovs-agent: Clear in_port=ofport flow earlier

This is the minimum change to pass tempest's
test_update_instance_port_admin_state test. Alternatively, the delete_flows
could be changed to just deal with drop_port flows, which can affect
3rd party codes.

 Conflicts:
	neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py

Change-Id: Id15eed5f21bc6842daceb28ee9bc660f20e9b04a
Closes-Bug: #1559920
(cherry picked from commit c54c5791b4)
This commit is contained in:
IWAMOTO Toshihiro 2016-12-05 13:28:59 +09:00 committed by Daniel Alvarez
parent fa1c3b4438
commit 466ab8f349
1 changed files with 3 additions and 3 deletions

View File

@ -827,6 +827,9 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
other_config['tag'] = str(lvm.vlan)
self.int_br.set_db_attribute(
"Port", port.port_name, "other_config", other_config)
# Uninitialized port has tag set to []
if cur_info['tag']:
self.int_br.delete_flows(in_port=port.ofport)
def _bind_devices(self, need_binding_ports):
devices_up = []
@ -851,9 +854,6 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
LOG.debug("Port %s was deleted concurrently, skipping it",
port.port_name)
continue
# Uninitialized port has tag set to []
if cur_tag and cur_tag != lvm.vlan:
self.int_br.delete_flows(in_port=port.ofport)
if self.prevent_arp_spoofing:
self.setup_arp_spoofing_protection(self.int_br,
port, port_detail)