Cleanup linuxbridge_neutron_agent

Bug #1514548 reported by Cedric Brandily
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Cedric Brandily

Bug Description

Cleanup linuxbridge_neutron_agent:

 * move bridge related features to bridge_lib
 * cleanup tests

Tags: linuxbridge
tags: added: linuxbridge
Changed in neutron:
assignee: nobody → Cedric Brandily (cbrandily)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit c9abc856eaa6dc4358867e13d6bf57f60319374f
Author: Cedric Brandily <email address hidden>
Date: Sat Nov 7 22:36:59 2015 +0100

    Reduce duplicated code in test_linuxbridge_neutron_agent

    This change defines and uses get_linuxbridge_manager method which
    mocks some methods in order to instantiate and returns a
    LinuxBridgeManager instance, this method allows to remove some
    duplicated code from test_linuxbridge_neutron_agent.

    Partial-Bug: #1514548
    Change-Id: Ib54a01406938b4937af2af5fca7a71b5758d4482

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/242259
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=459980f04a62e2ef15a2b8c91ac6c8d6ee484167
Submitter: Jenkins
Branch: master

commit 459980f04a62e2ef15a2b8c91ac6c8d6ee484167
Author: Cedric Brandily <email address hidden>
Date: Thu Nov 5 23:40:45 2015 +0100

    Move LinuxBridge related features to bridge_lib

    This change moves from linuxbridge agent[1] to bridge_lib[2] bridge only
    related features and adds functional tests.

    [1] neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent
    [2] neutron.agent.linux.bridge_lib

    Partial-Bug: #1514548
    Change-Id: Ieccb8f77fc833467a166557e227023f5c2a50d1b

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit cc2d30eba4f7b2d0676dd308c9c9fe6328e44447
Author: Cedric Brandily <email address hidden>
Date: Fri Nov 6 00:49:21 2015 +0100

    Replace get_all_neutron_bridges by get_deletable_bridges

    Currently LinuxBridge L2-agent[1] defines get_all_neutron_bridges which
    lists all bridges managed by the agent including user-defined ones BUT
    this method is only used by neutron-linuxbridge-cleanup[2] in order to
    remove empty non-user-defined bridges returned get_all_neutron_bridges.

    This change replaces this method by get_deletable_bridges which returns
    bridges managed by LB agent which are "deletable" (ie: non user-defined).
    This allows to simplify code and move the computation of "deletable"
    bridges to LB agent code.

    [1] neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent
    [2] neutron.cmd.linuxbridge_cleanup

    Partial-Bug: #1514548
    Change-Id: I2f8a9a6982ce0ce77187ae4b7a58b3ef752aab34

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit d3da15d62d4270dfb5a20e8d4051c7e17c8c2c9b
Author: Cedric Brandily <email address hidden>
Date: Fri Nov 6 00:19:36 2015 +0100

    Use get_interface_bridge instead of get_bridge_for_tap_device

    bridge_lib defines get_interface_bridge which returns the bridge on
    which an interface is connected (or None) where LB L2-agent[1] returns
    it only if the bridge is a bridge managed by LB L2-agent.

    According to get_bridge_for_tap_device 1st usage:

      if bridge_lib.is_bridged_interface(interface):
         bridge = self.get_bridge_for_tap_device(interface)
         bridge.delif(interface)

    The code crashs if interface is owned by a non-LB-agent bridge because
    the condition is verified but bridge is None.

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

    Partial-Bug: #1514548
    Change-Id: If6dba1197b3f08ecc0ac01fcf085c8268f81169f

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/250031
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=02f33380a827bd900eb3f34fb7d84d266227a725
Submitter: Jenkins
Branch: master

commit 02f33380a827bd900eb3f34fb7d84d266227a725
Author: Cedric Brandily <email address hidden>
Date: Wed Nov 25 22:17:52 2015 +0100

    Move a note to bridge_lib

    This change moves a note from linuxbridge agent[1] to bridge_lib which
    was forgotten in a previous change[2].

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

    Partial-Bug: #1514548
    Change-Id: I1562b75ce07eec280824cdfe6b8aba80c9d9170c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit ba6b4302413ccd8b0553cdb5868a824c7595da1d
Author: Cedric Brandily <email address hidden>
Date: Wed Nov 25 22:43:43 2015 +0100

    Remove useless lb-agent remove_empty_bridges

    This change removes LB-agent[1] remove_empty_bridges is no more unused
    since change[2].

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

    Partial-Bug: #1514548
    Change-Id: Iaf7213aaeddcac4843d9b410d910cf7dc7b8e603

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