ovs_lib.OVSBridge.get_ports_attributes returns all ports in case there's no ports on the OVSBridge in question

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

Bug Description

If OVSBridge.get_ports_attributes is executed on an empty bridge, get_port_name_list will return an empty list. In which case, ovsdb.db_list is executed with port_names = [], meaning that it will return all ports, instead of no ports.

The implication is that if, for example, br-ex (An ancillary bridge in the OVS agent) is currently empty, then scan_ancillary_ports will pick up all ports. All ports on the system will be considered ancillary_ports, which is unexpected and can result in ports going DOWN when they shouldn't.

Assaf Muller (amuller)
Changed in neutron:
assignee: nobody → Assaf Muller (amuller)
importance: Undecided → Low
importance: Low → Medium
tags: added: ovs
Assaf Muller (amuller)
description: updated
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/227982

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

Reviewed: https://review.openstack.org/227982
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9c3e3a0fcee012ee0187b19931d63927379a621f
Submitter: Jenkins
Branch: master

commit 9c3e3a0fcee012ee0187b19931d63927379a621f
Author: Assaf Muller <email address hidden>
Date: Fri Sep 25 14:20:21 2015 -0400

    Handle empty bridge case in OVSBridge.get_ports_attributes

    Before this patch, get_ports_attributes would call
    get_port_name_list. In the case of an empty bridge,
    get_port_name_list would return an empty list and feed that
    in to ovsdb.db_list, thereby returning all ports instead of
    no ports.

    Change-Id: I5a91028c59d71943b7cef86a94fa6ab1cc3d667c
    Closes-Bug: #1499821

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

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/233135

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

Reviewed: https://review.openstack.org/233135
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a43e35b4ce738f65f50d30e8fd985ddc54867b3c
Submitter: Jenkins
Branch: stable/liberty

commit a43e35b4ce738f65f50d30e8fd985ddc54867b3c
Author: Assaf Muller <email address hidden>
Date: Fri Sep 25 14:20:21 2015 -0400

    Handle empty bridge case in OVSBridge.get_ports_attributes

    Before this patch, get_ports_attributes would call
    get_port_name_list. In the case of an empty bridge,
    get_port_name_list would return an empty list and feed that
    in to ovsdb.db_list, thereby returning all ports instead of
    no ports.

    Change-Id: I5a91028c59d71943b7cef86a94fa6ab1cc3d667c
    Closes-Bug: #1499821
    (cherry picked from commit 9c3e3a0fcee012ee0187b19931d63927379a621f)

tags: added: in-stable-liberty
Eric Pendergrass (eap-x)
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/241782

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

Change abandoned by Eric Pendergrass (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/241782
Reason: get_ports_attributes is not in kilo

Eric Pendergrass (eap-x)
tags: removed: kilo-backport-potential
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b1

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

Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.1

This issue was fixed in the openstack/neutron 7.0.1 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.