problem with network delete when using gateways.

Bug #950381 reported by dan wendlandt on 2012-03-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dan wendlandt

Bug Description

When using:
nova-manage --flagfile=/etc/nova/nova.conf network delete --uuid=<net_uuid>

We are seeing:

(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/local/bin/nova-manage", line 7, in <module>
(nova): TRACE: execfile(__file__)
(nova): TRACE: File "/opt/stack/nova/bin/nova-manage", line 2396, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/opt/stack/nova/bin/nova-manage", line 2383, in main
(nova): TRACE: fn(*fn_args, **fn_kwargs)
(nova): TRACE: File "/opt/stack/nova/bin/nova-manage", line 854, in delete
(nova): TRACE: fixed_range, uuid)
(nova): TRACE: File "/opt/stack/nova/nova/network/quantum/", line 254, in delete_network
(nova): TRACE: raise exception.NetworkBusy(network=net_uuid)
(nova): TRACE: NetworkBusy: Network ae1d67bf-b006-4c27-8543-04d0c408c015 has active ports, cannot delete.
(nova): TRACE:

This is on account of the gateway port not getting cleaned up. I do see that the QuantumManager tries to clean up the gateway port if it's the only one remaining, but that does not seem to be happening for some reason.

I just want to check if anyone is able to delete networks successfully using the nova-manage command (specifically which have the gateway port already provisioned on them as consequence of at least one VM having attached to that network at some point).

dan wendlandt (danwent) wrote :

Hi Sumit, thanks for the report. I think this is a bug. Taking a quick look, nova-manage seems to ignore the flags file and load the wrong linux_net.interface_driver. Can you try this patch?

diff --git a/bin/nova-manage b/bin/nova-manage
index 4927614..16b5331 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -105,7 +105,6 @@ flags.DECLARE('network_size', '')
 flags.DECLARE('vlan_start', '')
 flags.DECLARE('vpn_start', '')
 flags.DECLARE('default_floating_pool', '')
-flags.DECLARE('public_interface', '')

 # Decorators for actions
@@ -632,6 +631,7 @@ class FloatingIpCommands(object):
           help='Optional interface')
     def create(self, ip_range, pool=None, interface=None):
         """Creates floating ips for zone by range"""
         + flags.DECLARE('public_interface', '')
         addresses = netaddr.IPNetwork(ip_range)
         admin_context = context.get_admin_context()
         if not pool:

Changed in quantum:
importance: Undecided → High
milestone: none → essex-rc1
assignee: nobody → dan wendlandt (danwent)
status: New → In Progress
Sumit Naiksatam (snaiksat) wrote :

Hi Dan, I can confirm that this fix works. I was also noticing that the right driver was not being loaded, but I had not traced it back to nova-manage. Nice work!

dan wendlandt (danwent) on 2012-03-13
Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-03-19
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in quantum:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions