IP commands are not applied when bridges are modified

Bug #1806128 reported by Dan Sneddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
Fix Released
Critical
Harald Jensås

Bug Description

os-net-config contains a bug in the logic to apply changes to bridges, it attempts to work with an "interface" instead of the "bridge" item from the loop:

            for bridge in apply_bridges:
                logger.debug('Running ip commands on bridge: %s' %
                             interface[0])
                commands = self.iproute2_apply_commands(interface[0],
                                                        interface[1],
                                                        interface[2])
                for command in commands:
                    try:
                        args = command.split()
                        self.execute('Running ip %s' % command, ipcmd, *args)
                    except Exception as e:
                        logger.warning("Error in 'ip %s', restarting %s:\n%s" %
                                       (command, interface[0], str(e)))
                        restart_bridges.append(interface[0])
                        restart_interfaces.extend(
                            self.child_members(interface[0]))
                        break

Dan Sneddon (dsneddon)
Changed in os-net-config:
importance: Undecided → Critical
status: New → Triaged
assignee: nobody → Dan Sneddon (dsneddon)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (master)

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

Changed in os-net-config:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in os-net-config:
assignee: Dan Sneddon (dsneddon) → Harald Jensås (harald-jensas)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (master)

Reviewed: https://review.openstack.org/621298
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=19067b4e77ec618ffef67acc771869ecbc33ad34
Submitter: Zuul
Branch: master

commit 19067b4e77ec618ffef67acc771869ecbc33ad34
Author: Harald Jensås <email address hidden>
Date: Fri Nov 30 10:54:06 2018 +0100

    Fix - restart VLAN interface on underlying device change

    When a change is needed on bond, os-net-config write the
    configuration and restart nic and bond. But it does not
    restart vlan on top of the bond. The results is that all
    routes for vlan interfaces are lost.

    This moves the processing of VLAN's so that it run's
    after any interfaces, bridges, bonds etc. Then
    concatenates the restart lists from other interfaces and
    do a check if 'PHYSDEV' of a VLAN interface is being
    restarted.

    Closes-Bug: #1806128
    Related: RHBZ#1654987
    Change-Id: I246da54cf02d06466f52d210f89d82ca9e2a6ef2

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

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

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/pike)

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

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

Reviewed: https://review.openstack.org/621291
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=61b0d665e6b9a0ff35ce06e2bcc315a54e4efbdb
Submitter: Zuul
Branch: master

commit 61b0d665e6b9a0ff35ce06e2bcc315a54e4efbdb
Author: Dan Sneddon <email address hidden>
Date: Fri Nov 30 13:14:59 2018 -0800

    Fix incorrect application of 'ip' commands for bridges

    The code that applies iproute2 commands to bridges that are
    modified specifies "interface" rather than "bridge", so it does
    not function correctly. This patch fixes the typos so that
    bridges will have updates applied through iproute2 if a restart
    is not required.

    Change-Id: I53df2f3506cca2b69e4f1f59471c7b90dc8fdfb7
    Closes-bug: 1806128

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 10.2.0

This issue was fixed in the openstack/os-net-config 10.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/rocky)

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

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

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

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

Reviewed: https://review.openstack.org/639980
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=88ffc5059f5e18bd2bc5ff414825c1ea27c8cfb6
Submitter: Zuul
Branch: stable/rocky

commit 88ffc5059f5e18bd2bc5ff414825c1ea27c8cfb6
Author: Dan Sneddon <email address hidden>
Date: Fri Nov 30 13:14:59 2018 -0800

    Fix incorrect application of 'ip' commands for bridges

    The code that applies iproute2 commands to bridges that are
    modified specifies "interface" rather than "bridge", so it does
    not function correctly. This patch fixes the typos so that
    bridges will have updates applied through iproute2 if a restart
    is not required.

    Change-Id: I53df2f3506cca2b69e4f1f59471c7b90dc8fdfb7
    Closes-bug: 1806128
    (cherry picked from commit 61b0d665e6b9a0ff35ce06e2bcc315a54e4efbdb)

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

Reviewed: https://review.openstack.org/639982
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=adff3c49df22aed7af918ea55657e0036677c237
Submitter: Zuul
Branch: stable/queens

commit adff3c49df22aed7af918ea55657e0036677c237
Author: Dan Sneddon <email address hidden>
Date: Fri Nov 30 13:14:59 2018 -0800

    Fix incorrect application of 'ip' commands for bridges

    The code that applies iproute2 commands to bridges that are
    modified specifies "interface" rather than "bridge", so it does
    not function correctly. This patch fixes the typos so that
    bridges will have updates applied through iproute2 if a restart
    is not required.

    Change-Id: I53df2f3506cca2b69e4f1f59471c7b90dc8fdfb7
    Closes-bug: 1806128
    (cherry picked from commit 61b0d665e6b9a0ff35ce06e2bcc315a54e4efbdb)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 9.4.0

This issue was fixed in the openstack/os-net-config 9.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 8.5.0

This issue was fixed in the openstack/os-net-config 8.5.0 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.