Linux bridge agent "interface_exists_on_bridge" can be optimized

Bug #1509890 reported by Cedric Brandily
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Cedric Brandily

Bug Description

Currently, when lb agent needs to check if an interface exists on a bridge, it will get all interfaces on the bridge and looks for the interface:

 for filename in os.listdir(BRIDGE_INTERFACES_FS):
   if filename == interface:
     return True
   return False

when we can directly check os.path.join(BRIDGE_INTERFACE_FS, interface) existence.

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/239299

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/239299
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0f471be1de5aadc935c3b48625193dc23360e467
Submitter: Jenkins
Branch: master

commit 0f471be1de5aadc935c3b48625193dc23360e467
Author: Cedric Brandily <email address hidden>
Date: Mon Oct 26 09:19:26 2015 +0900

    Optimize interface_exists_on_bridge

    Currently interface_exists_on_bridge[1] lists all files in a folder and
    searchs for the file associated to the interface.

    This change proposes to look for the file existence directly.

    [1] neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent

    Closes-Bug: #1509890
    Change-Id: I23cd1edc92912b35bdc23ba0af2318b86f2cfd48

Changed in neutron:
status: In Progress → Fix Committed
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
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.