No valid check on cinder quota class hard_limit value

Bug #1245360 reported by ling-yun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
ling-yun
Havana
Fix Released
Medium
ling-yun

Bug Description

Cinder quota class hard_limit’s value doesn’t do a valid check, which can be set to value less than -1.
Test steps as follow:
1.tenantA’s quota class info
root@ubuntu:/opt/stack/tempest# cinder quota-class-show aa2d79d43e884aa7ae498768d98731e5
+-----------+-------+
| Property | Value |
+-----------+-------+
| gigabytes | 1000 |
| snapshots | 10 |
| volumes | 10 |
+-----------+-------+
2.Upadte tenantA’s class info
1)request
http://10.250.10.171:8776/v2/aa2d79d43e884aa7ae498768d98731e5/os-quota-class-sets/aa2d79d43e884aa7ae498768d98731e5
{
    "quota_class_set":{
    "volumes":-11111
 }
}
2)Reponse
{"quota_class_set": {"gigabytes": 1000, "volumes": -11111, "snapshots": 10}}
3.Result check: tenantA’s quota class hard_limit value is set to -111.
root@ubuntu:/opt/stack/tempest# cinder quota-class-show aa2d79d43e884aa7ae498768d98731e5
+-----------+--------+
| Property | Value |
+-----------+--------+
| gigabytes | 1000 |
| snapshots | 10 |
| volumes | -11111 |
+-----------+--------+

ling-yun (zengyunling)
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/54068

Changed in cinder:
status: New → In Progress
Changed in cinder:
assignee: ling-yun (zengyunling) → Avishay Traeger (avishay-il)
Changed in cinder:
assignee: Avishay Traeger (avishay-il) → ling-yun (zengyunling)
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/54068
Committed: http://github.com/openstack/cinder/commit/8b6d51ea04a65d846b0e92a11e191327360d7427
Submitter: Jenkins
Branch: master

commit 8b6d51ea04a65d846b0e92a11e191327360d7427
Author: ling-yun <email address hidden>
Date: Mon Oct 28 15:38:35 2013 +0800

    Add valid check and unit tests on quota class

    1.Cinder quota class hard_limit’s value should larger than -1 (-1 is a flag
    value for unlimited).
    2.Add unit tests for quota class.

    Closes-bug: #1245360

    Change-Id: Ie483db1bdbd4fac875de26abab8ebebd96f4938b

Changed in cinder:
status: In Progress → Fix Committed
Changed in cinder:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in cinder:
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/64081

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/havana)

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

commit 07892b1738cae49b709cbb7e4657dd29751d8c6d
Author: ling-yun <email address hidden>
Date: Mon Oct 28 15:38:35 2013 +0800

    Add valid check and unit tests on quota class

    1.Cinder quota class hard_limit’s value should larger than -1 (-1 is a flag
    value for unlimited).
    2.Add unit tests for quota class.
    3.Add quota_classes extension enabled in unitest, so as to do
    unitest for quota_classes' update operation.

    Closes-bug: #1245360

    Change-Id: Ie483db1bdbd4fac875de26abab8ebebd96f4938b
    (cherry picked from commit 8b6d51ea04a65d846b0e92a11e191327360d7427)

tags: added: in-stable-havana
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.

Other bug subscribers

Remote bug watches

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