quota-update doesn't report error,If a user supply invalid key

Bug #1064864 reported by Vijaya Erukala
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Davanum Srinivas (DIMS)

Bug Description

using following curl command I have tried to set my quota with invalid key "vijaya"

$curl -i http://10.233.52.15:8774/v2/d29a428985334b9bbf24ad8809bfe344/os-quota-sets/d29a428985334b9bbf24ad8809bfe344 -X PUT -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: d6b60e0b59ac48e5a56ad707dcaeb7f9" -d'{"quota_set": {"vijaya": 20, "tenant_id": "d29a428985334b9bbf24ad8809bfe344"}}'
HTTP/1.1 200 OK
X-Compute-Request-Id: req-ab2211a3-b538-4065-b37d-c90837f53ce7
Content-Type: application/json
Content-Length: 297
Date: Wed, 10 Oct 2012 11:04:01 GMT

{"quota_set": {"metadata_items": 128, "injected_file_content_bytes": 10240, "injected_files": 5, "gigabytes": 1000, "ram": 51200, "floating_ips": 10, "security_group_rules": 20, "instances": 10, "key_pairs": 100, "volumes": 20, "cores": 20, "injected_file_path_bytes": 255, "security_groups": 10}}

Though nova validating the key value at the server end but not reporting if the validation fails.
so it should report the failure with HTTP 400 with proper error message.

Changed in ceilometer:
assignee: nobody → Vijaya Erukala (vijaya-erukala)
affects: ceilometer → nova
description: updated
Revision history for this message
Michael Still (mikal) wrote :

There was a similar problem with nova-manage which was fixed yesterday.

Michael Still (mikal)
Changed in nova:
importance: Undecided → Medium
Changed in nova:
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/23887

Changed in nova:
assignee: Vijaya Erukala (vijaya-erukala) → Davanum Srinivas (DIMS) (dims-v)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit a753af1e4a6b4b42dc4a0b4238f4b0ca6175c2d7
Author: Davanum Srinivas <email address hidden>
Date: Thu Mar 7 22:17:56 2013 -0500

    Do not accept invalid keys in quota-update

    Check if the keys are valid and respond with HTTPBadRequest
    when they are not.

    Found a spot in wsgi where we were trying to use xml namespace
    as data for the payload, we need to skip them when converting
    to json

    Fix for LP# 1064864

    Change-Id: Ic4a68047adf3ccf2dbac669b1b66d73bfe4d58de

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