similar issue come back, this time bond1(mode=4 lacp) is built from 2 nics, then create 2 vlan interfaces (name is vlan1162, vlan1163) based on bond1.
vlan1162 is added into bridge "br-ex", vlan1163 is added into bridge "br-ex2".
I can simply reproduce the issue by restart neutron-openvswitch-agent service and found flow table on br-ex is empty.
I applied your patch and found the following log:
2017-07-15 21:13:33.128 6 WARNING neutron.plugins.ml2.drivers.openvswitch.agent.openflow.native.ofswitch [req-570e6b8c-ddf4-454b-8924-4e2edea1904b - - - - -] Deleting flow with cookie 0xbdc758dfcf1b2f4d 2017-07-15 21:13:33.129 6 DEBUG neutron.plugins.ml2.drivers.openvswitch.agent.openflow.native.ofswitch [req-570e6b8c-ddf4-454b-8924-4e2edea1904b - - - - -] ofctl request version=0x4,msg_type=0xe,msg_len=0x38,xid=0xaebd71d9,OFPFlowMod(buffer_id=4294967295,command=3,cookie=13674996511809417037L,cookie_mask=18446744073709551615L,flags=0,hard_timeout=0,idle_timeout=0,instructions=[],match=OFPMatch(oxm_fields={}),out_group=4294967295,out_port=4294967295,priority=0,table_id=255) result None _send_msg /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ofswitch.py:93 2017-07-15 21:13:33.130 6 INFO neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-570e6b8c-ddf4-454b-8924-4e2edea1904b - - - - -] Cleaning stale br-ex flows
2017-07-15 21:13:33.133 6 DEBUG neutron.plugins.ml2.drivers.openvswitch.agent.openflow.native.ofswitch [req-570e6b8c-ddf4-454b-8924-4e2edea1904b - - - - -] Reserved cookies for br-ex: set([13674996511809417037L]) cleanup_flows /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ofswitch.py:141
similar issue come back, this time bond1(mode=4 lacp) is built from 2 nics, then create 2 vlan interfaces (name is vlan1162, vlan1163) based on bond1.
vlan1162 is added into bridge "br-ex", vlan1163 is added into bridge "br-ex2".
I can simply reproduce the issue by restart neutron- openvswitch- agent service and found flow table on br-ex is empty.
I applied your patch and found the following log:
2017-07-15 21:13:33.128 6 WARNING neutron. plugins. ml2.drivers. openvswitch. agent.openflow. native. ofswitch [req-570e6b8c- ddf4-454b- 8924-4e2edea190 4b - - - - -] Deleting flow with cookie 0xbdc758dfcf1b2f4d plugins. ml2.drivers. openvswitch. agent.openflow. native. ofswitch [req-570e6b8c- ddf4-454b- 8924-4e2edea190 4b - - - - -] ofctl request version= 0x4,msg_ type=0xe, msg_len= 0x38,xid= 0xaebd71d9, OFPFlowMod( buffer_ id=4294967295, command= 3,cookie= 136749965118094 17037L, cookie_ mask=1844674407 3709551615L, flags=0, hard_timeout= 0,idle_ timeout= 0,instructions= [],match= OFPMatch( oxm_fields= {}),out_ group=429496729 5,out_port= 4294967295, priority= 0,table_ id=255) result None _send_msg /usr/lib/ python2. 7/site- packages/ neutron/ plugins/ ml2/drivers/ openvswitch/ agent/openflow/ native/ ofswitch. py:93 plugins. ml2.drivers. openvswitch. agent.ovs_ neutron_ agent [req-570e6b8c- ddf4-454b- 8924-4e2edea190 4b - - - - -] Cleaning stale br-ex flows
2017-07-15 21:13:33.129 6 DEBUG neutron.
2017-07-15 21:13:33.130 6 INFO neutron.
2017-07-15 21:13:33.133 6 DEBUG neutron. plugins. ml2.drivers. openvswitch. agent.openflow. native. ofswitch [req-570e6b8c- ddf4-454b- 8924-4e2edea190 4b - - - - -] Reserved cookies for br-ex: set([1367499651 1809417037L] ) cleanup_flows /usr/lib/ python2. 7/site- packages/ neutron/ plugins/ ml2/drivers/ openvswitch/ agent/openflow/ native/ ofswitch. py:141