My environment's essential information:
queens branch
DVR model
drop_flows_on_start is confiured true
As shown below, when the config option 'drop_flows_on_start' is false, the flows of br-int is complete.
[root@compute2 ~]# ovs-ofctl dump-flows br-int
cookie=0xe66a6d121ba9839f, duration=9.793s, table=0, n_packets=0, n_bytes=0, priority=4,in_port="int-br-ex",dl_src=fa:16:3f:2e:17:8e actions=resubmit(,2)
cookie=0xe66a6d121ba9839f, duration=9.791s, table=0, n_packets=0, n_bytes=0, priority=2,in_port="patch-tun",dl_src=fa:16:3f:2e:17:8e actions=resubmit(,1)
cookie=0xe66a6d121ba9839f, duration=9.789s, table=0, n_packets=0, n_bytes=0, priority=4,in_port="int-br-ex",dl_src=fa:16:3f:de:6c:16 actions=resubmit(,2)
cookie=0xe66a6d121ba9839f, duration=9.786s, table=0, n_packets=0, n_bytes=0, priority=2,in_port="patch-tun",dl_src=fa:16:3f:de:6c:16 actions=resubmit(,1)
cookie=0xe66a6d121ba9839f, duration=9.817s, table=0, n_packets=0, n_bytes=0, priority=2,in_port="int-br-ex" actions=drop
cookie=0xe66a6d121ba9839f, duration=10.712s, table=0, n_packets=0, n_bytes=0, priority=0 actions=resubmit(,60)
cookie=0xe66a6d121ba9839f, duration=9.820s, table=1, n_packets=0, n_bytes=0, priority=1 actions=drop
cookie=0xe66a6d121ba9839f, duration=9.819s, table=2, n_packets=0, n_bytes=0, priority=1 actions=drop
cookie=0xe66a6d121ba9839f, duration=9.821s, table=23, n_packets=0, n_bytes=0, priority=0 actions=drop
cookie=0xe66a6d121ba9839f, duration=10.706s, table=24, n_packets=0, n_bytes=0, priority=0 actions=drop
cookie=0xe66a6d121ba9839f, duration=10.709s, table=60, n_packets=0, n_bytes=0, priority=3 actions=NORMAL
[root@compute2 ~]#
But, when 'drop_flows_on_start' is configured true, some requisite flows will be missing.
[root@compute2 ~]# ovs-ofctl dump-flows br-int
cookie=0x9fbc60c2eb19902d, duration=7.069s, table=0, n_packets=0, n_bytes=0, priority=4,in_port="int-br-ex",dl_src=fa:16:3f:2e:17:8e actions=resubmit(,2)
cookie=0x9fbc60c2eb19902d, duration=7.066s, table=0, n_packets=0, n_bytes=0, priority=2,in_port="patch-tun",dl_src=fa:16:3f:2e:17:8e actions=resubmit(,1)
cookie=0x9fbc60c2eb19902d, duration=7.064s, table=0, n_packets=0, n_bytes=0, priority=4,in_port="int-br-ex",dl_src=fa:16:3f:de:6c:16 actions=resubmit(,2)
cookie=0x9fbc60c2eb19902d, duration=7.061s, table=0, n_packets=0, n_bytes=0, priority=2,in_port="patch-tun",dl_src=fa:16:3f:de:6c:16 actions=resubmit(,1)
cookie=0x9fbc60c2eb19902d, duration=7.102s, table=0, n_packets=0, n_bytes=0, priority=2,in_port="int-br-ex" actions=drop
cookie=0x9fbc60c2eb19902d, duration=7.106s, table=1, n_packets=0, n_bytes=0, priority=1 actions=drop
cookie=0x9fbc60c2eb19902d, duration=7.104s, table=2, n_packets=0, n_bytes=0, priority=1 actions=drop
cookie=0x9fbc60c2eb19902d, duration=7.107s, table=23, n_packets=0, n_bytes=0, priority=0 actions=drop
[root@compute2 ~]#
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? flows_on_ integ_br( self): mac_address) AGENT.drop_ flows_on_ start: br.uninstall_ flows(cookie= ovs_lib. COOKIE_ ANY)
207 def setup_dvr_
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_
212 # Remove existing flows in integration bridge
213 if self.conf.
214 self.int_
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. on_br(self) : OVSBridge. create( ) will run br.create( ) br.set_ secure_ mode() br.setup_ controllers( self.conf) AGENT.drop_ flows_on_ start: br.delete_ port(self. conf.OVS. int_peer_ patch_port) br.uninstall_ flows(cookie= ovs_lib. COOKIE_ ANY) br.setup_ default_ table()
1003 def setup_integrati
1004 '''Setup the integration bridge.
1005
1006 '''
1007 # Ensure the integration bridge is created.
1008 # ovs_lib.
1009 # ovs-vsctl -- --may-exist add-br BRIDGE_NAME
1010 # which does nothing if bridge already exists.
1011 self.int_
1012 self.int_
1013 self.int_
1014
1015 if self.conf.
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_
1020 self.int_
1021 self.int_