Sometimes can't delete quantum networks by the command "nova delete ", it throws the exception "NetworkBusy" or "NetworkInUse
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Invalid
|
Undecided
|
Unassigned |
Bug Description
if we create some quantum networks, when using following command to delete the network:
nova-manage network delete --uuid=
sometimes ( not all , sometimes it is ok ) we can see following exception:
2012-06-16 13:54:58 TRACE nova Traceback (most recent call last):
2012-06-16 13:54:58 TRACE nova File "/usr/bin/
2012-06-16 13:54:58 TRACE nova execfile(__file__)
2012-06-16 13:54:58 TRACE nova File "/bak/openstack
2012-06-16 13:54:58 TRACE nova main()
2012-06-16 13:54:58 TRACE nova File "/bak/openstack
2012-06-16 13:54:58 TRACE nova fn(*fn_args, **fn_kwargs)
2012-06-16 13:54:58 TRACE nova File "/bak/openstack
2012-06-16 13:54:58 TRACE nova fixed_range, uuid)
2012-06-16 13:54:58 TRACE nova File "/bak/openstack
2012-06-16 13:54:58 TRACE nova raise exception.
2012-06-16 13:54:58 TRACE nova NetworkBusy: Network 1fbc7e90-
2012-06-16 13:54:58 TRACE nova
[hua@hua devstack]$ echo $?
1
when I use following scripts to set active ports to 'DOWN'
NETWORK_
TENANT_
for PORT_ID in `quantum list_ports $TENANT_ID $NETWORK_ID | grep "Port:" | awk -F ': ' '{print $2}'`; do
quantum update_port $TENANT_ID $NETWORK_ID $PORT_ID state='DOWN'
quantum unplug_iface $TENANT_ID $NETWORK_ID $PORT_ID
quantum delete_port $TENANT_ID $NETWORK_ID $PORT_ID
done
I execute "nova delete " command again, we can see the NetworkInUse exception.
2012-06-16 13:56:03 TRACE nova Traceback (most recent call last):
2012-06-16 13:56:03 TRACE nova File "/usr/bin/
2012-06-16 13:56:03 TRACE nova execfile(__file__)
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova main()
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova fn(*fn_args, **fn_kwargs)
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova fixed_range, uuid)
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova self.ipam.
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova require_
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova return func(self, context, *args, **kwargs)
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova self.db.
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova return IMPL.network_
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova return f(*args, **kwargs)
2012-06-16 13:56:03 TRACE nova File "/bak/openstack
2012-06-16 13:56:03 TRACE nova raise exception.
2012-06-16 13:56:03 TRACE nova NetworkInUse: Network 4 is still in use.
but in this time, network has benn removed from quantum DB, but it still has this network in nova DB, so if we excute "nova delete " command again, it will throw NetworkNotFound exception:
2012-06-16 13:56:32 TRACE nova params=filter_ops)
2012-06-16 13:56:32 TRACE nova File "/bak/openstack
2012-06-16 13:56:32 TRACE nova _("Quantum entity not found: %s"), data)
2012-06-16 13:56:32 TRACE nova QuantumNotFound
can someone delete networks successfully by the nova-manage command ?
this is not a bug, after " nova-manage network delete", we only need sleep a few seconds to wait quantum agent to finished the request. will close it