update quota sets API does not handle all fail cases

Bug #1249971 reported by ling-yun
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
ling-yun
Havana
Fix Released
Low
ling-yun

Bug Description

The update quota sets API should check whether 'quota_set' is in body.

The code to update quota sets does the following:

for key in body['quota_set'].keys():

ling-yun (zengyunling)
description: updated
Changed in cinder:
assignee: nobody → ling-yun (zengyunling)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/55849
Committed: http://github.com/openstack/cinder/commit/2ed2f3aff8eee70e02eb995780af292057cfcad4
Submitter: Jenkins
Branch: master

commit 2ed2f3aff8eee70e02eb995780af292057cfcad4
Author: ling-yun <email address hidden>
Date: Mon Nov 11 22:00:03 2013 +0800

    Update quota-set throw 500 error

    The server doesn't check whether the parameter "quota_set" or
    "quota_class_set" is in request
    body.So the 500 error has been thrown.

    We should catch the KeyError and transfer the KeyError to
    400(HTTPBadRequest) instead of 500.

    Change-Id: I01260c77efa50324f3d203888689cdb1e94d2c21
    Closes-Bug: #1249971

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/64008

Alan Pevec (apevec)
Changed in cinder:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/havana)

Reviewed: https://review.openstack.org/64008
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ed41b6804a8eafb710f8faec425e22ebe0b85ca9
Submitter: Jenkins
Branch: stable/havana

commit ed41b6804a8eafb710f8faec425e22ebe0b85ca9
Author: ling-yun <email address hidden>
Date: Mon Nov 11 22:00:03 2013 +0800

    Update quota-set throw 500 error

    The server doesn't check whether the parameter "quota_set" or
    "quota_class_set" is in request
    body.So the 500 error has been thrown.

    We should catch the KeyError and transfer the KeyError to
    400(HTTPBadRequest) instead of 500.

    Closes-Bug: #1249971
    (cherry picked from commit 2ed2f3aff8eee70e02eb995780af292057cfcad4)
    Change-Id: I01260c77efa50324f3d203888689cdb1e94d2c21

Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.