File 0001-ovs-agent-Clear-in_port-ofport-flow-earlier.patch of Package openstack-neutron
From 466ab8f3492e5fc6756a00fc2dbf6d2dfc0fa9b7 Mon Sep 17 00:00:00 2001
From: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Date: Mon, 5 Dec 2016 13:28:59 +0900
Subject: [PATCH] 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 c54c5791b43deada9936f0c9c5d8b681a3216893)
---
.../ml2/drivers/openvswitch/agent/ovs_neutron_agent.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: neutron-9.4.2.dev21/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
===================================================================
--- neutron-9.4.2.dev21.orig/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
+++ neutron-9.4.2.dev21/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
@@ -846,6 +846,9 @@ class OVSNeutronAgent(sg_rpc.SecurityGro
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 = []
@@ -870,9 +873,6 @@ class OVSNeutronAgent(sg_rpc.SecurityGro
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)