Network delete - does it work?

Asked by Sumit Naiksatam

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/manager.py", 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).

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
Sumit Naiksatam
Solved:
Last query:
Last reply:
Revision history for this message
dan wendlandt (danwent) said :
#1

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', 'nova.network.manager')
 flags.DECLARE('vlan_start', 'nova.network.manager')
 flags.DECLARE('vpn_start', 'nova.network.manager')
 flags.DECLARE('default_floating_pool', 'nova.network.manager')
-flags.DECLARE('public_interface', 'nova.network.linux_net')

 # 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', 'nova.network.linux_net')
         addresses = netaddr.IPNetwork(ip_range)
         admin_context = context.get_admin_context()
         if not pool:

Revision history for this message
dan wendlandt (danwent) said :
#2

its probably obvious, but launchpad messed up the indentation in the patch for the "+" line.

Revision history for this message
Sumit Naiksatam (snaiksat) said :
#3

Yeah no worries, we are checking. Thanks!

Revision history for this message
Sumit Naiksatam (snaiksat) said :
#4

I was seeing the wrong driver being invoked as well. This patch fixes the problem, thanks Dan!