br-int lose flows ephemerally due to unnecessary flow operation

Bug #1843425 reported by Zhangruochen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Zhangruochen

Bug Description

when restart ovs-agent, br-int lose flows ephemerally due to unnecessary flow operation.

In _add_port_tag_info[1],type of lvm.vlan is int and other_config.get('tag') is a str, they can never be equal. We should do type conversion for lvm.vlan before comparing to avoid unnecessary operation of ovsdb and flows.

[1] https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py#L1063-L1070

Zhangruochen (royking)
description: updated
Revision history for this message
LIU Yulong (dragon889) wrote :

I may confirm the types, these are some log output from local test:
type cur_info['tag']: <type 'int'>
type lvm.vlan: <type 'int'>
type other_config.get('tag'): <type 'unicode'>

value cur_info['tag']: 2
value lvm.vlan: 2
value other_config.get('tag'): 2

Indeed that uninstall_flows can be called.

Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/681462

Changed in neutron:
assignee: nobody → Zhangruochen (royking)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/681462
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0550c0e1f66b26e7e947958fdddb60d8f309e76f
Submitter: Zuul
Branch: master

commit 0550c0e1f66b26e7e947958fdddb60d8f309e76f
Author: RoyKing <email address hidden>
Date: Wed Sep 11 20:38:27 2019 +0800

    Avoid unnecessary operation of ovsdb and flows

    Type of lvm.vlan is int and other_config.get('tag') is a string,
    they can never be equal. We should do type conversion before
    comparing to avoid unnecessary operation of ovsdb and flows.

    Change-Id: Ib84da6296ddf3c95be9e9f370eb574bf92ceec15
    Closes-Bug: #1843425

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/683762

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

Reviewed: https://review.opendev.org/683762
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5eb234b226b517942da1d508013b5eac672818e6
Submitter: Zuul
Branch: stable/stein

commit 5eb234b226b517942da1d508013b5eac672818e6
Author: RoyKing <email address hidden>
Date: Wed Sep 11 20:38:27 2019 +0800

    Avoid unnecessary operation of ovsdb and flows

    Type of lvm.vlan is int and other_config.get('tag') is a string,
    they can never be equal. We should do type conversion before
    comparing to avoid unnecessary operation of ovsdb and flows.

    Change-Id: Ib84da6296ddf3c95be9e9f370eb574bf92ceec15
    Closes-Bug: #1843425
    (cherry picked from commit 0550c0e1f66b26e7e947958fdddb60d8f309e76f)

tags: added: in-stable-stein
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.opendev.org/684154

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

Change abandoned by Zhangruochen (<email address hidden>) on branch: stable/rocky
Review: https://review.opendev.org/684154

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.opendev.org/684242

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

Reviewed: https://review.opendev.org/684154
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=58f290c81ec6e023501366702225ded8fad5f178
Submitter: Zuul
Branch: stable/rocky

commit 58f290c81ec6e023501366702225ded8fad5f178
Author: RoyKing <email address hidden>
Date: Wed Sep 11 20:38:27 2019 +0800

    Avoid unnecessary operation of ovsdb and flows

    Type of lvm.vlan is int and other_config.get('tag') is a string,
    they can never be equal. We should do type conversion before
    comparing to avoid unnecessary operation of ovsdb and flows.

    Change-Id: Ib84da6296ddf3c95be9e9f370eb574bf92ceec15
    Closes-Bug: #1843425
    (cherry picked from commit 0550c0e1f66b26e7e947958fdddb60d8f309e76f)

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

This issue was fixed in the openstack/neutron 15.0.0.0rc1 release candidate.

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

Reviewed: https://review.opendev.org/684242
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=71907718674cdba74481690777f5020434016d0c
Submitter: Zuul
Branch: stable/queens

commit 71907718674cdba74481690777f5020434016d0c
Author: RoyKing <email address hidden>
Date: Wed Sep 11 20:38:27 2019 +0800

    Avoid unnecessary operation of ovsdb and flows

    Type of lvm.vlan is int and other_config.get('tag') is a string,
    they can never be equal. We should do type conversion before
    comparing to avoid unnecessary operation of ovsdb and flows.

    Change-Id: Ib84da6296ddf3c95be9e9f370eb574bf92ceec15
    Closes-Bug: #1843425
    (cherry picked from commit 0550c0e1f66b26e7e947958fdddb60d8f309e76f)

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

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

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

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

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

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

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

Other bug subscribers