I found some flow tables of br-int will be missing After I restarted neutron-openvswitch-agent.

Bug #1775146 reported by yangjianfeng
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
yangjianfeng

Bug Description

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 ~]#

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()

tags: added: ovs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/572341

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/queens)

Change abandoned by Yang JianFeng (<email address hidden>) on branch: stable/queens
Review: https://review.openstack.org/572341

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/572729

Changed in neutron:
assignee: nobody → yangjianfeng (yangjianfeng)
status: New → In Progress
Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
assignee: yangjianfeng (yangjianfeng) → nobody
status: In Progress → New
tags: added: timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Slawek Kaplonski (<email address hidden>) on branch: master
Review: https://review.openstack.org/572729
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in neutron:
assignee: nobody → Brian Haley (brian-haley)
status: New → In Progress
Revision history for this message
Miguel Lavalle (minsel) wrote :

I confirmed that this is syill happening in master branch: http://paste.openstack.org/show/729642/. It boils down to loosing 3 flows from tables 24 (1 flow) and table 60 (1 flow)

Changed in neutron:
assignee: Brian Haley (brian-haley) → yangjianfeng (yangjianfeng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/572729
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=760870b6c238f5f2aa5fec33852e51b4ebccb718
Submitter: Zuul
Branch: master

commit 760870b6c238f5f2aa5fec33852e51b4ebccb718
Author: Yang JianFeng <email address hidden>
Date: Wed Jun 6 10:55:00 2018 +0000

    Don't uninstall flow tables in setup_dvr_flows_on_integ_br

    This is a revise for I7b24a159962af7b58c096a1b2766e2169e9f8aed

    Br-int's flow tables are already uninstalled in setup_integration_br.
    And setup_integration_br will install some default flows. If we still
    uninstall flow tables of br-int in setup_dvr_flows_on_integ_br, these
    default flow tables will be missing.

    Closes-Bug: #1775146
    Change-Id: I71c1f9034dfc913b9e9ae17cc8f6bd084c9ee580

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/604494

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/604498

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/rocky)

Reviewed: https://review.openstack.org/604494
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0ea92d3541f51787fd7df2975be802ac5eded580
Submitter: Zuul
Branch: stable/rocky

commit 0ea92d3541f51787fd7df2975be802ac5eded580
Author: Yang JianFeng <email address hidden>
Date: Wed Jun 6 10:55:00 2018 +0000

    Don't uninstall flow tables in setup_dvr_flows_on_integ_br

    This is a revise for I7b24a159962af7b58c096a1b2766e2169e9f8aed

    Br-int's flow tables are already uninstalled in setup_integration_br.
    And setup_integration_br will install some default flows. If we still
    uninstall flow tables of br-int in setup_dvr_flows_on_integ_br, these
    default flow tables will be missing.

    Closes-Bug: #1775146
    Change-Id: I71c1f9034dfc913b9e9ae17cc8f6bd084c9ee580
    (cherry picked from commit 760870b6c238f5f2aa5fec33852e51b4ebccb718)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/queens)

Reviewed: https://review.openstack.org/604498
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9bc8ad58e5e7fcd52f85be88e168c9c3a253a130
Submitter: Zuul
Branch: stable/queens

commit 9bc8ad58e5e7fcd52f85be88e168c9c3a253a130
Author: Yang JianFeng <email address hidden>
Date: Wed Jun 6 10:55:00 2018 +0000

    Don't uninstall flow tables in setup_dvr_flows_on_integ_br

    This is a revise for I7b24a159962af7b58c096a1b2766e2169e9f8aed

    Br-int's flow tables are already uninstalled in setup_integration_br.
    And setup_integration_br will install some default flows. If we still
    uninstall flow tables of br-int in setup_dvr_flows_on_integ_br, these
    default flow tables will be missing.

    Closes-Bug: #1775146
    Change-Id: I71c1f9034dfc913b9e9ae17cc8f6bd084c9ee580
    (cherry picked from commit 760870b6c238f5f2aa5fec33852e51b4ebccb718)

tags: added: in-stable-queens
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/613538

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/613540

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/pike)

Reviewed: https://review.openstack.org/613538
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=6b701e6e4e695b875263e7bc8c3854f000358ceb
Submitter: Zuul
Branch: stable/pike

commit 6b701e6e4e695b875263e7bc8c3854f000358ceb
Author: Yang JianFeng <email address hidden>
Date: Wed Jun 6 10:55:00 2018 +0000

    Don't uninstall flow tables in setup_dvr_flows_on_integ_br

    This is a revise for I7b24a159962af7b58c096a1b2766e2169e9f8aed

    Br-int's flow tables are already uninstalled in setup_integration_br.
    And setup_integration_br will install some default flows. If we still
    uninstall flow tables of br-int in setup_dvr_flows_on_integ_br, these
    default flow tables will be missing.

    Closes-Bug: #1775146
    Change-Id: I71c1f9034dfc913b9e9ae17cc8f6bd084c9ee580
    (cherry picked from commit 760870b6c238f5f2aa5fec33852e51b4ebccb718)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ocata)

Reviewed: https://review.openstack.org/613540
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e17ff7a32e069c44c6ff02cd9aafa768d413f369
Submitter: Zuul
Branch: stable/ocata

commit e17ff7a32e069c44c6ff02cd9aafa768d413f369
Author: Yang JianFeng <email address hidden>
Date: Wed Jun 6 10:55:00 2018 +0000

    Don't uninstall flow tables in setup_dvr_flows_on_integ_br

    This is a revise for I7b24a159962af7b58c096a1b2766e2169e9f8aed

    Br-int's flow tables are already uninstalled in setup_integration_br.
    And setup_integration_br will install some default flows. If we still
    uninstall flow tables of br-int in setup_dvr_flows_on_integ_br, these
    default flow tables will be missing.

    Closes-Bug: #1775146
    Change-Id: I71c1f9034dfc913b9e9ae17cc8f6bd084c9ee580
    (cherry picked from commit 760870b6c238f5f2aa5fec33852e51b4ebccb718)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.2

This issue was fixed in the openstack/neutron 13.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.6

This issue was fixed in the openstack/neutron 11.0.6 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 12.0.5

This issue was fixed in the openstack/neutron 12.0.5 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 14.0.0.0b1

This issue was fixed in the openstack/neutron 14.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron ocata-eol

This issue was fixed in the openstack/neutron ocata-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.