Internal server error when deleting an associated network

Bug #1023315 reported by Alexej Ababilov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Alexej Ababilov
Essex
New
Undecided
Unassigned

Bug Description

If you try to delete a network through API and this network is associated with a project, you will retrieve compute fault message.

curl -X 'DELETE' 'http://main-node:8774/v1.1/45d2e66674b647c2bee1d1f18ae64e93/gd-networks/44b6f3d2-ed5f-4711-b2fa-96e29cf13ac0' -H 'X-Auth-Token: b4be16290db84726bc71d10f0947aa13'
{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}

To fix the bug, a RemoteError has to be caught.

nova-api.log:

[u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.6/site-packages/nova/rpc/amqp.py", line 253, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/usr/lib/python2.
6/site-packages/nova/network/manager.py", line 257, in wrapped\n return func(self, context, *args, **kwargs)\n', u' File "/usr/lib/python2.6/site-packages/nova/network/manager.py", line 1424, in delete_netwo
rk\n \' before delete\') % network.project_id)\n', u'ValueError: Network must be disassociated from project a83299fae9d045aca03d8d8337a71796 before delete\n'].
2012-07-11 11:26:37 TRACE nova.api.openstack Traceback (most recent call last):
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/api/openstack/__init__.py", line 41, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack return req.get_response(self.application)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/webob/request.py", line 1053, in get_response
2012-07-11 11:26:37 TRACE nova.api.openstack application, catch_exc_info=False)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/webob/request.py", line 1022, in call_application
2012-07-11 11:26:37 TRACE nova.api.openstack app_iter = application(self.environ, start_response)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/keystone/middleware/auth_token.py", line 176, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack return self.app(env, start_response)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/webob/dec.py", line 159, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack return resp(environ, start_response)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/webob/dec.py", line 159, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack return resp(environ, start_response)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/webob/dec.py", line 159, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack return resp(environ, start_response)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/routes/middleware.py", line 131, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack response = self.app(environ, start_response)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/webob/dec.py", line 159, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack return resp(environ, start_response)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/webob/dec.py", line 147, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/webob/dec.py", line 208, in call_func
2012-07-11 11:26:37 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 803, in __call__
2012-07-11 11:26:37 TRACE nova.api.openstack content_type, body, accept)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 851, in _process_stack
2012-07-11 11:26:37 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 926, in dispatch
2012-07-11 11:26:37 TRACE nova.api.openstack return method(req=request, **action_args)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova_networks/networks.py", line 121, in delete
2012-07-11 11:26:37 TRACE nova.api.openstack self.network_api.delete(context, id)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/network/api.py", line 58, in delete
2012-07-11 11:26:37 TRACE nova.api.openstack 'uuid': network_uuid}})
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/rpc/__init__.py", line 68, in call
2012-07-11 11:26:37 TRACE nova.api.openstack return _get_impl().call(context, topic, msg, timeout)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/rpc/impl_kombu.py", line 674, in call
2012-07-11 11:26:37 TRACE nova.api.openstack return rpc_amqp.call(context, topic, msg, timeout, Connection.pool)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/rpc/amqp.py", line 343, in call
2012-07-11 11:26:37 TRACE nova.api.openstack rv = list(rv)
2012-07-11 11:26:37 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/rpc/amqp.py", line 311, in __iter__
2012-07-11 11:26:37 TRACE nova.api.openstack raise result
2012-07-11 11:26:37 TRACE nova.api.openstack RemoteError: Remote error: ValueError Network must be disassociated from project a83299fae9d045aca03d8d8337a71796 before delete

Thierry Carrez (ttx)
affects: nova → python-novaclient
affects: python-novaclient → nova
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/10124

Changed in nova:
assignee: nobody → Alessio Ababilov (aababilov)
status: Confirmed → In Progress
Revision history for this message
Mark McLoughlin (markmc) wrote :

Pretty sure this is fixed in Folsom by: https://review.openstack.org/#/c/5749/

Changed in nova:
status: In Progress → Fix Released
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.