nova API returns 404 for floating-ip-list if an instance has disappeared
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Medium
|
ashwini |
Bug Description
I'm not exactly sure how to reproduce the problem.
In my case, one (out of two) compute nodes crashed, leaving a few instances listed which needed replacing.
First the old instances was deleted, but it's still hanging around in the list since that compute node was crashed.
Then released the floating ip via the horizon interface, and assigned it via nova client.
While deleting and re-assigning floating ip's to new instances, something got set wrong. Which now result in floating ip's being broken for that tenant.
```
nova --os-tenant-name API floating-ip-list
ERROR: The resource could not be found. (HTTP 404) (Request-ID: req-9c6165ab-
```
The log from nova-api shows:
```
2013-01-22 10:20:21 ERROR nova.api.openstack [req-9c6165ab-
2013-01-22 10:20:21 TRACE nova.api.openstack Traceback (most recent call last):
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return req.get_
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack application, catch_exc_
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack app_iter = application(
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return self.app(env, start_response)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack response = self.app(environ, start_response)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack content_type, body, accept)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return method(req=request, **action_args)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack self._set_
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack instance_uuid)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return self.compute_
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack instance = self.db.
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return IMPL.instance_
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack return f(*args, **kwargs)
2013-01-22 10:20:21 TRACE nova.api.openstack File "/usr/lib/
2013-01-22 10:20:21 TRACE nova.api.openstack raise exception.
2013-01-22 10:20:21 TRACE nova.api.openstack InstanceNotFound: Instance 10502b84-
2013-01-22 10:20:21 TRACE nova.api.openstack
2013-01-22 10:20:21 INFO nova.api.openstack [req-9c6165ab-
2013-01-22 10:20:21 INFO nova.osapi_
```
Maybe floating ip's assigned to non-existing instances can be reclaimed somehow without poking in the database?
affects: | openstack-ci → nova |
Changed in nova: | |
status: | Incomplete → New |
Changed in nova: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in nova: | |
assignee: | nobody → ashwini (ashwini-mhatre) |
So these are also broken, returning 404:
nova --os-tenant-name API remove-floating-ip 10502b84- 3d5d-459a- ab97-de762ac48a 49 10.101.100.22
nova --os-tenant-name API floating-ip-delete 10.101.100.22