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

Bug #1401937 reported by Ilya Kharin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Medium
Marian Horban
5.1.x
Won't Fix
Medium
MOS Maintenance
6.0.x
Won't Fix
Medium
MOS Maintenance
6.1.x
Fix Released
Medium
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. On Fuel 5.1.1 with CentOS 6.5 these interfaces are not deleted. 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

Tags: linux nova centos
Revision history for this message
Dmitry Mescheryakov (dmitrymex) wrote :

Neutron team, the issue was reported for 5.1.1 only. Please investigate if 6.x is affected.

tags: added: neutron
Revision history for this message
Ilya Kharin (akscram) wrote :

This bug does not affect neutron, it's a nova-network bug.

tags: added: nova-network
removed: neutron
tags: added: nova
removed: nova-network
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Ok, so looks like this is not a nova-network issue, but rather a problem with linux kernel: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680094 (ip link delete won't work, but brctl delbr works just fine)

tags: added: linux
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Overall, I don't think this should be treated as High, as routing works as expected except the fact we have a couple of unused bridges hanging.

If we really want to see this fixed, we should either patch the kernel or hack nova-network (use brctl delbr instead of ip link delete+ ensure we've got a corresponding rootwrap rule). Neither of the solutions is going to be implemented in the maintenance release.

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

5.1+ ubuntu is not affected

tags: added: centos
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Only CentOS is affected due to using of 2.6.32 kernel.

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

So the fix will be to do:

  sudo ip link set <dev> down
  sudo brctl delbr <dev>

for bridge devices here

https://github.com/openstack/nova/blob/stable/juno/nova/network/linux_net.py#L1617-L1639

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

^ is a workaround for older kernels

Revision history for this message
Dmitry Mescheryakov (dmitrymex) wrote :

This is a medium issue, so we are not going to fix it in a maintenance release

Revision history for this message
OSCI Robot (oscirobot) wrote :

package nova has been built for project openstack/nova
Package version == 2014.2.2, package release == fuel6.1.mira2.git.025759a.bea7645

Changeset: https://review.fuel-infra.org/3595
project: openstack/nova
branch: openstack-ci/fuel-6.1/2014.2
author: Marian Horban
committer: Marian Horban
subject: Deleting of bridge corrected
status: patchset-created

Files placed on repository:

NOTE: Changeset is not merged, created temporary package repository.
 repository URL: /centos-fuel-6.1-stable-3595/

Revision history for this message
OSCI Robot (oscirobot) wrote :

package nova has been built for project openstack/nova
Package version == 2014.2.2, package release == fuel6.1~mira2+git.025759a.bea7645

Changeset: https://review.fuel-infra.org/3595
project: openstack/nova
branch: openstack-ci/fuel-6.1/2014.2
author: Marian Horban
committer: Marian Horban
subject: Deleting of bridge corrected
status: patchset-created

Files placed on repository:

NOTE: Changeset is not merged, created temporary package repository.
 repository URL: /ubuntu-fuel-6.1-stable-3595/

Revision history for this message
Alexander Gubanov (ogubanov) wrote :

I've verified it on MOS6.1 (build 432) - fixed!
ENV: CentOS - HA - Nova network VLAN - 3 controllers, 2 computes with Cinder
Proof here: http://pastebin.com/iquFQ6LE

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/nova (openstack-ci/fuel-7.0/2015.1.0)

Fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Marian Horban <email address hidden>
Review: https://review.fuel-infra.org/8256

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix proposed to openstack/nova (openstack-ci/fuel-7.0/2015.1.0)

Related fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Marian Horban <email address hidden>
Review: https://review.fuel-infra.org/8257

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/nova (openstack-ci/fuel-7.0/2015.1.0)

Change abandoned by Kholkin Pavel <email address hidden> on branch: openstack-ci/fuel-7.0/2015.1.0
Review: https://review.fuel-infra.org/8257
Reason: This patch is already in Kilo

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote :

Change abandoned by Kholkin Pavel <email address hidden> on branch: openstack-ci/fuel-7.0/2015.1.0
Review: https://review.fuel-infra.org/8256
Reason: This patch is already in Kilo

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.