Steps to Reproduce:
1.Launch an instance
2.nova remove-floating-ip (server id) 183.2.4.6 (This address is not associated with the instance)
Expected Result:
Message saying "No such floating-ip associated with the instance"
Actual Result:
The server has either erred or is incapable of performing the requested operation. (HTTP 500)
In nova-api log:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nova/api/openstack/__init__.py", line 41, in __call__
return req.get_response(self.application)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__
response = self.app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 786, in __call__
content_type, body, accept)
File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 834, in _process_stack
action_result = self.dispatch(meth, request, action_args)
File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 910, in dispatch
return method(req=request, **action_args)
File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/contrib/floating_ips.py", line 237, in _remove_floating_ipaddress)
File "/usr/lib/python2.7/dist-packages/nova/network/api.py", line 81, in get_floating_ip_by_address
'args': {'address': address}})
File "/usr/lib/python2.7/dist-packages/nova/rpc/__init__.py", line 69, in call
return _get_impl().call(context, topic, msg, timeout)
File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 611, in call
return rpc_amqp.call(context, topic, msg, timeout)
File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 334, in call
rv = list(rv)
File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 302, in __iter__
raise result
RemoteError: Remote error: FloatingIpNotFoundForAddress Floating ip not found for address 183.2.4.6.
[u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 249, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 238, in wrapped\n return func(self, context, *args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 543, in get_floating_ip_by_address\n address).iteritems())\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 340, in floating_ip_get_by_address\n return IMPL.floating_ip_get_by_address(context, address)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 119, in wrapper\n return f(*args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 853, in floating_ip_get_by_address\n raise exception.FloatingIpNotFoundForAddress(address=address)\n', u'FloatingIpNotFoundForAddress: Floating ip not found for address 183.2.4.6.\n'].
(nova.api.openstack): TRACE:
Disassociating Floating IP without passing Floating is also yielding 500, instead of Raising NotFound exception
The following is the nosetest log:
Negative Test:DISASSOCIATE floating ip without passing ... ERROR
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ------- ------- ------- ------- ------- ------- ------- ------- ------- muralik/ tempest_ harika/ 5thJune/ tempest/ tempest/ tests/test_ floating_ ips_actions. py", line 299, in test_dissociate _without_ passing_ floatingip client. disassociate_ floating_ ip_from_ server( '', self.server_id) muralik/ tempest_ harika/ 5thJune/ tempest/ tempest/ services/ nova/json/ floating_ ips_client. py", line 72, in disassociate_ floating_ ip_from_ server muralik/ tempest_ harika/ 5thJune/ tempest/ tempest/ common/ rest_client. py", line 152, in post 'POST', url, headers, body) muralik/ tempest_ harika/ 5thJune/ tempest/ tempest/ common/ rest_client. py", line 225, in request ComputeFault( message) ------- ------ >> begin captured logging << ------- ------- ------ tempest_ harika/ 5thJune/ tempest/ etc/tempest. conf common. rest_client: ERROR: Request URL: http:// 10.233. 52.27:8774/ v2/b0f9c09937de 4a15864cd15ea0c 28810/images/ f0a26cd1- 0735-4347- 8cdc-c70c829e9f 87 common. rest_client: ERROR: Request Body: None common. rest_client: ERROR: Response Headers: {'date': 'Wed, 06 Jun 2012 14:03:44 GMT', 'status': '404', 'content-length': '62', 'content-type': 'application/json; charset=UTF-8', 'x-compute- request- id': 'req-bffa816d- 1575-4a63- bd84-766412e76e 2e'} common. rest_client: ERROR: Response Body: {"itemNotFound": {"message": "Image not found.", "code": 404}} common. rest_client: ERROR: Request URL: http:// 10.233. 52.27:8774/ v2/b0f9c09937de 4a15864cd15ea0c 28810/servers/ f8f2dd2f- a5f6-43a1- 9796-6f3279a4d5 95/action common. rest_client: ERROR: Request Body: {"removeFloatin gIp": {"address": ""}} common. rest_client: ERROR: Response Headers: {'date': 'Wed, 06 Jun 2012 14:04:06 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute- request- id': 'req-3a6321ca- 3dfa-447d- b809-f8c245d2ec 22'} common. rest_client: ERROR: Response Body: {u'computeFault': {u'message': u'The server has either erred or is incapable of performing the requested operation.', u'code': 500}} ------- ------- >> end captured logging << ------- ------- -------
ERROR: Negative Test:DISASSOCIATE floating ip without passing
-------
Traceback (most recent call last):
File "/home/
self.
File "/home/
resp, body = self.post(url, post_body, self.headers)
File "/home/
return self.request(
File "/home/
raise exceptions.
ComputeFault: Got compute fault
Details: Got compute fault
Details: The server has either erred or is incapable of performing the requested operation.
-------
tempest.config: INFO: Using tempest config file /home/muralik/
tempest.
tempest.
tempest.
tempest.
tempest.
tempest.
tempest.
tempest.
-------
------- ------- ------- ------- ------- ------- ------- ------- ------- -------
Ran 1 test in 21.563s
FAILED (errors=1)