404 error message can be user friendly while deleting the non-existing floating ip

Bug #1056038 reported by Vijaya Erukala
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Vijaya Erukala

Bug Description

while deleting the non-existent floating IP 404 exception is thrown with the generic messge.
It should show proper message rather than generic.

$curl -i http://10.233.52.14:8774/v2/01397f9733ea4b7b9adb0647c187163e/os-floating-ips/11 -X DELETE -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 1b41a42cf3fb40d697c27f6a7c7df82a"
HTTP/1.1 404 Not Found
Content-Length: 78
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-f03f7eab-fab8-44a2-be21-de839ef14df3
Date: Tue, 25 Sep 2012 14:12:34 GMT

{"itemNotFound": {"message": "The resource could not be found.", "code": 404}}

Changed in nova:
assignee: nobody → Vijaya Erukala (vijaya-erukala)
description: updated
Revision history for this message
Sirisha Devineni (sirisha-devineni) wrote :

While trying to create a volume using an invalid JSON request body which doesn't contain "volume", "size" keywords then HTTP400 and HTTP422 error responses are being returned with generic error messages as follows:

$ curl -i http://127.0.0.1:8776/v1/01397f9733ea4b7b9adb0647c187163e/volumes -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 3727775c56274c9a9689bf01fe331593" -d'{"volume": {"snapshot_id": null, "display_name": null, "volume_type": null, "display_description": null, "sze": 1}}'
HTTP/1.1 400 Bad Request
Content-Length: 141
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-196de57a-ea8c-4f46-bda7-8e8cf37e603d
Date: Tue, 25 Sep 2012 14:33:00 GMT

{"badRequest": {"message": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400}}

$ curl -i http://127.0.0.1:8776/v1/01397f9733ea4b7b9adb0647c187163e/volumes -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 3727775c56274c9a9689bf01fe331593" -d'{"volum": {"snapshot_id": null, "display_name": null, "volume_type": null, "display_description": null, "size": 1}}'
HTTP/1.1 422 Unprocessable Entity
Content-Length: 90
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-e7083775-f2e1-4c85-8f04-5f6301f19a5a
Date: Tue, 25 Sep 2012 14:33:20 GMT

{"computeFault": {"message": "Unable to process the contained instructions", "code": 422}}openstack@ubuntu1204:~$

If these messages can be specific, that will be helpful to the user.

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
importance: Low → Wishlist
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/13694
Committed: http://github.com/openstack/nova/commit/be4f059aa225fde6170f75a1abd338cadc351ef2
Submitter: Jenkins
Branch: master

commit be4f059aa225fde6170f75a1abd338cadc351ef2
Author: vijaya-erukala <email address hidden>
Date: Tue Sep 25 16:07:57 2012 +0530

    Modified 404 error response to show specific message

    User-friendly messages are returned for invalid
    floating-ip and volume inputs

    Fixes bug 1056038

    Change-Id: I659323b81ac435793152f9b49335b350c0801d81

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-1 → 2013.1
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.