yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #10204
[Bug 1261633] Re: tenant of admin delete vm failed
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1261633
Title:
tenant of admin delete vm failed
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
Tenant of admin create vm in another tenant network,then deleting that vm will failed,the failed log is bellow
my environment is: OS ubuntu 12.04
openstack package:2013.2-0ubuntu1~cloud0
TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line 461, in _process_data
**args)
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py", line 172, in dispatch
result = getattr(proxyobj, method)(ctxt, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 353, in decorated_function
return function(self, context, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 90, in wrapped
payload)
File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 73, in wrapped
return f(self, context, *args, **kw)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 243, in decorated_function
pass
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 229, in decorated_function
return function(self, context, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 294, in decorated_function
function(self, context, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 271, in decorated_function
e, sys.exc_info())
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 258, in decorated_function
return function(self, context, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1792, in terminate_instance
do_terminate_instance(instance, bdms)
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py", line 246, in inner
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1784, in do_terminate_instance
reservations=reservations)
File "/usr/lib/python2.7/dist-packages/nova/hooks.py", line 105, in inner
rv = f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1757, in _delete_instance
user_id=user_id)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1729, in _delete_instance
self._shutdown_instance(context, db_inst, bdms)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1639, in _shutdown_instance
network_info = self._get_instance_nw_info(context, instance)
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 876, in _get_instance_nw_info
instance)
File "/usr/lib/python2.7/dist-packages/nova/network/neutronv2/api.py", line 455, in get_instance_nw_info
result = self._get_instance_nw_info(context, instance, networks)
File "/usr/lib/python2.7/dist-packages/nova/network/neutronv2/api.py", line 463, in _get_instance_nw_info
nw_info = self._build_network_info_model(context, instance, networks)
File "/usr/lib/python2.7/dist-packages/nova/network/neutronv2/api.py", line 997, in _build_network_info_model
ports = [port for port in ports if port['network_id'] in net_ids]
File "/usr/lib/python2.7/dist-packages/nova/network/neutronv2/api.py", line 962, in _nw_info_build_network
label=network_name,
UnboundLocalError: local variable 'network_name' referenced before assignment
I analyse the failed log, in _build_network_info_model
networks = self._get_available_networks(context,
instance['project_id'])
when tenant of admin deleting vm, nova get network according to the tenant ID ,but that network doesn't belong to admin,so the error " local variable 'network_name' referenced before assignment " happens
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1261633/+subscriptions
References