Comment 1 for bug 1775146

Revision history for this message
yangjianfeng (yangjianfeng) wrote :

After a preliminary inspection I seem to have found the reason about the bug.

L213,L214 in "neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py" whether still need?
207 def setup_dvr_flows_on_integ_br(self):
208 '''Setup up initial dvr flows into br-int'''
209
210 LOG.info("L2 Agent operating in DVR Mode with MAC %s",
211 self.dvr_mac_address)
212 # Remove existing flows in integration bridge
213 if self.conf.AGENT.drop_flows_on_start:
214 self.int_br.uninstall_flows(cookie=ovs_lib.COOKIE_ANY)

Because, Br-int's flow tables are already uninstall in 'neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py'. And, some default flow tables will be set here. we will miss those flows if we still uninstall br-int's flows through dvr agent.
1003 def setup_integration_br(self):
1004 '''Setup the integration bridge.
1005
1006 '''
1007 # Ensure the integration bridge is created.
1008 # ovs_lib.OVSBridge.create() will run
1009 # ovs-vsctl -- --may-exist add-br BRIDGE_NAME
1010 # which does nothing if bridge already exists.
1011 self.int_br.create()
1012 self.int_br.set_secure_mode()
1013 self.int_br.setup_controllers(self.conf)
1014
1015 if self.conf.AGENT.drop_flows_on_start:
1016 # Delete the patch port between br-int and br-tun if we're deleting
1017 # the flows on br-int, so that traffic doesn't get flooded over
1018 # while flows are missing.
1019 self.int_br.delete_port(self.conf.OVS.int_peer_patch_port)
1020 self.int_br.uninstall_flows(cookie=ovs_lib.COOKIE_ANY)
1021 self.int_br.setup_default_table()