Floating IP addresses leak if you delete an instance with one assigned
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned | ||
nova (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
(This is with the stock Ubuntu Essex packages)
I've been running VMs by hand on my test machine. I've been assigning IP addresses from the floating pool:
nova floating-ip-create
nova add-floating-ip <machine> <ip>
However, because I'm testing by hand at the moment, sometimes I've been killing the machines without removing IP addresses first:
nova delete <machine>
I've been doing this for some time and apparently I've exhausted my limited pool of available floating IPs. I am now in the situation where I can't assign a floating IP because they're all inaccessible:
$ nova floating-ip-create
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
$ nova add-floating-ip <machine> 172.29.50.72
ERROR: Associate floating ip failed (HTTP 500)
(Obviously I can't remove a floating IP because the machine it's assigned to has been deleted by this point)
$ nova floating-ip-delete 172.29.50.72
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
Relavant traces from the nova-api log:
(floating-
2012-08-11 10:14:21 INFO nova.api.
2012-08-11 10:14:21 ERROR nova.api.openstack [req-0c047374-
[u'Traceback (most recent call last):\n', u' File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack Traceback (most recent call last):
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return req.get_
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack application, catch_exc_
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack app_iter = application(
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return self.app(env, start_response)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return resp(environ, start_response)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return resp(environ, start_response)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack response = self.app(environ, start_response)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return resp(environ, start_response)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack content_type, body, accept)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return method(req=request, **action_args)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack address = self.network_
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack 'pool': pool}})
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return _get_impl(
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack return rpc_amqp.
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack rv = list(rv)
2012-08-11 10:14:21 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack raise result
2012-08-11 10:14:21 TRACE nova.api.openstack RemoteError: Remote error: QuotaError Quota exceeded: code=AddressLim
2012-08-11 10:14:21 TRACE nova.api.openstack [u'Traceback (most recent call last):\n', u' File "/usr/lib/
2012-08-11 10:14:21 TRACE nova.api.openstack
2012-08-11 10:14:21 INFO nova.api.openstack [req-0c047374-
(floating-
2012-08-11 10:15:50 INFO nova.api.
2012-08-11 10:15:50 ERROR nova.api.openstack [req-5c00329c-
2012-08-11 10:15:50 TRACE nova.api.openstack Traceback (most recent call last):
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return req.get_
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack application, catch_exc_
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack app_iter = application(
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return self.app(env, start_response)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return resp(environ, start_response)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return resp(environ, start_response)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack response = self.app(environ, start_response)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return resp(environ, start_response)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack content_type, body, accept)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return method(req=request, **action_args)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack self._set_
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack instance_id)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return self.compute_
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack instance = self.db.
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return IMPL.instance_
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack return f(*args, **kwargs)
2012-08-11 10:15:50 TRACE nova.api.openstack File "/usr/lib/
2012-08-11 10:15:50 TRACE nova.api.openstack raise exception.
2012-08-11 10:15:50 TRACE nova.api.openstack InstanceNotFound: Instance 5 could not be found.
2012-08-11 10:15:50 TRACE nova.api.openstack
2012-08-11 10:15:50 INFO nova.api.openstack [req-5c00329c-
(add-floating-ip):
2012-08-11 10:16:26 INFO nova.api.
2012-08-11 10:16:26 INFO nova.api.
2012-08-11 10:16:27 INFO nova.api.
Changed in nova (Ubuntu): | |
status: | New → Invalid |
Quick analysis:
- floating-ip-create is failing with a quota violation, which is totally reasonable, but that error turns into a nondescript error before coming out of the CLI
- floating-ip-delete won't delete an IP from a nonexistent instance
I think IPs ought to be freed automatically on instance death, but I've found no documentation to suggest that there's any behaviour specified for this case.