Error while removing a non existing interface from a Linux Bridge

Bug #1736727 reported by Rodolfo Alonso
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
os-vif
Fix Released
Medium
Rodolfo Alonso
Ocata
Fix Committed
Medium
sean mooney
Pike
In Progress
Medium
Jan Zerebecki

Bug Description

There is an error in the function vif_plug_ovs.linux_net:delete_bridge [1]. In this function, both the bridge and the interface given as input parameters are deleted. But if the interface doesn't exist, it will raise an error [2]:

Dec 06 11:10:26.047648 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif [None req-4a02b03d-9539-4104-9a17-acea8eea1e2a tempest-ServerActionsTestJSON-1476948723 tempest-ServerActionsTestJSON-1476948723] Failed to unplug vif VIFBridge(active=True,address=fa:16:3e:fc:ff:c4,bridge_name='qbrff00d447-d4',fixed_ips=<?>,has_traffic_filtering=True,id=ff00d447-d4be-4c3a-a735-c5229508a40a,network=Network(842fbf1e-da6b-43d9-9e51-d0e945f428d7),plugin='ovs',port_profile=VIFPortProfileOpenVSwitch,preserve_on_delete=False,vif_name='tapff00d447-d4'): ProcessExecutionError: Unexpected error while running command.
Dec 06 11:10:26.048232 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: Command: brctl delif qbrff00d447-d4 qvbff00d447-d4
Dec 06 11:10:26.048403 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: Exit code: 1
Dec 06 11:10:26.048667 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: Stdout: u''
Dec 06 11:10:26.048860 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: Stderr: u'device qvbff00d447-d4 is not a slave of qbrff00d447-d4\n'
Dec 06 11:10:26.048999 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif Traceback (most recent call last):
Dec 06 11:10:26.049144 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif File "/opt/stack/new/os-vif/os_vif/__init__.py", line 110, in unplug
Dec 06 11:10:26.049272 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif plugin.unplug(vif, instance_info)
Dec 06 11:10:26.049405 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif File "/opt/stack/new/os-vif/vif_plug_ovs/ovs.py", line 275, in unplug
Dec 06 11:10:26.049553 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif self._unplug_bridge(vif, instance_info)
Dec 06 11:10:26.049675 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif File "/opt/stack/new/os-vif/vif_plug_ovs/ovs.py", line 240, in _unplug_bridge
Dec 06 11:10:26.049807 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif linux_net.delete_bridge(vif.bridge_name, v1_name)
Dec 06 11:10:26.049927 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif File "/usr/local/lib/python2.7/dist-packages/oslo_privsep/priv_context.py", line 205, in _wrap
Dec 06 11:10:26.050113 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif return self.channel.remote_call(name, args, kwargs)
Dec 06 11:10:26.050302 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif File "/usr/local/lib/python2.7/dist-packages/oslo_privsep/daemon.py", line 202, in remote_call
Dec 06 11:10:26.050459 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif raise exc_type(*result[2])
Dec 06 11:10:26.050621 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif ProcessExecutionError: Unexpected error while running command.
Dec 06 11:10:26.050748 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif Command: brctl delif qbrff00d447-d4 qvbff00d447-d4
Dec 06 11:10:26.050885 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif Exit code: 1
Dec 06 11:10:26.051000 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif Stdout: u''
Dec 06 11:10:26.051122 ubuntu-xenial-rax-dfw-0001245870 nova-compute[27299]: ERROR os_vif Stderr: u'device qvbff00d447-d4 is not a slave of qbrff00d447-d4\n'

[1] https://github.com/openstack/os-vif/blob/stable/pike/vif_plug_ovs/linux_net.py#L172
[2] http://logs.openstack.org/12/476612/21/check/legacy-tempest-dsvm-nova-os-vif/12abddd/logs/screen-n-cpu.txt.gz?level=ERROR

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-vif (master)

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

Changed in os-vif:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-vif (stable/pike)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-vif 1.8.0

This issue was fixed in the openstack/os-vif 1.8.0 release.

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/554523

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

Reviewed: https://review.openstack.org/531465
Committed: https://git.openstack.org/cgit/openstack/os-vif/commit/?id=5f7ad5283ce2d1ae99184e06824d6e6f70b83ae9
Submitter: Zuul
Branch: stable/pike

commit 5f7ad5283ce2d1ae99184e06824d6e6f70b83ae9
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Dec 6 14:05:15 2017 +0000

    Check if interface belongs to a Linux Bridge before removing

    Checks if an interface belongs to a Linux Bridge before deleting
    the interface and the bridge.

    Change-Id: I03145681e0634ec52663a1ec4f54021e3325a6b1
    Closes-Bug: #1736727
    (cherry picked from commit 72b27d0e8664e3b4055dcf5d2fc191c94b696681)

tags: added: in-stable-pike
Matt Riedemann (mriedem)
Changed in os-vif:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-vif (stable/ocata)

Reviewed: https://review.openstack.org/554523
Committed: https://git.openstack.org/cgit/openstack/os-vif/commit/?id=ff0f33a3fa65e71815f204a9ade3f5532a5ffb7a
Submitter: Zuul
Branch: stable/ocata

commit ff0f33a3fa65e71815f204a9ade3f5532a5ffb7a
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Dec 6 14:05:15 2017 +0000

    Check if interface belongs to a Linux Bridge before removing

    Checks if an interface belongs to a Linux Bridge before deleting
    the interface and the bridge.

    Change-Id: I03145681e0634ec52663a1ec4f54021e3325a6b1
    Closes-Bug: #1736727
    (cherry picked from commit 72b27d0e8664e3b4055dcf5d2fc191c94b696681)

Changed in os-vif:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-vif 1.7.1

This issue was fixed in the openstack/os-vif 1.7.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-vif ocata-eol

This issue was fixed in the openstack/os-vif ocata-eol 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.