nova network on multihost does not delete bridges during deletion of networks

Bug #1424756 reported by Marian Horban
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Marian Horban

Bug Description

The teardown_unused_network_gateway parameter=true parameters is used by VlanManager in nova-network to remove bridge and vlan interfaces when the network is deleted. With CentOS 6.5 these interfaces are not delete bridge. In the log there are right lines:

2014-12-12 14:50:33.957 4606 DEBUG nova.openstack.common.processutils [req-8f33392b-db62-462c-a6b5-8008b7ea5412 ] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf ip link delete br204 execute /usr/lib/python2.6/site-packages/nova/openstack/common/processutils.py:154
2014-12-12 14:50:32.881 4606 DEBUG nova.network.linux_net [req-3ec984c3-fbab-45c2-9002-057a6e3306a2 None] Net device removed: 'br204' delete_net_dev /usr/lib/python2.6/site-packages/nova/network/linux_net.py:1361

But actually the bridge interface still exists:

154: br204: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 10.42.1.3/24 brd 10.42.1.255 scope global br204
    inet 10.42.2.3/24 brd 10.42.2.255 scope global br204
    inet6 fe80::109d:f0ff:feb2:9d64/64 scope link
       valid_lft forever preferred_lft forever

The command fails in the shell:

[root@node-77 ~]# ip link delete br204
RTNETLINK answers: Operation not supported
[root@node-77 ~]# echo $?
2

This bug is not a nova-network issue, but rather a problem with linux kernel: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680094 , but can be fixed in nova-network by replacing "ip link delete" command with "ip link set <dev> down && brctl delbr <dev>" commands

Tags: nova-network
Marian Horban (mhorban)
Changed in scorched3d (Ubuntu):
assignee: nobody → Marian Horban (mhorban)
status: New → In Progress
affects: scorched3d (Ubuntu) → nova
Revision history for this message
Marian Horban (mhorban) wrote :

Test script for reproducing bug in attachment.
Before using script env variables $COMPUTE_HOST(IP address of compute node) and $COMPUTE_USER(OS user of compute node) must be exported.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Setting to High because this leaves bridges around after deletion of instances...

Changed in nova:
importance: Undecided → High
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Looks like the review for this bug is:
https://review.openstack.org/#/c/157471/

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

Reviewed: https://review.openstack.org/157471
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1c1a7974ff2acde5d35a1f7a6d9767cd38869752
Submitter: Jenkins
Branch: master

commit 1c1a7974ff2acde5d35a1f7a6d9767cd38869752
Author: Marian Horban <email address hidden>
Date: Thu Feb 19 13:06:11 2015 -0500

    Ensure bridge deleted with brctl delbr

    A linux kernel bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680094)
    causes `ip link delete` to fail to remove a bridge created
    with brctl. Using `brctl delbr` ensures that the bridge is
    properly destroyed.

    Closes-Bug: #1424756
    Change-Id: I18241f5fa989b177ea54e1347827cee6b629b253

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-3 → 2015.1.0
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.