This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1312757 - Quota limit of child project can be set bigger than limit of parent project
Quota limit of child project can be set bigger than limit of parent project
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
unspecified Severity medium
: ---
: 9.0 (Mitaka)
Assigned To: Tom Barron
lkuchlan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-29 03:31 EST by lkuchlan
Modified: 2016-05-23 09:11 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-23 09:11:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1548645 None None None 2016-02-29 03:31 EST
OpenStack gerrit 282068 None None None 2016-04-02 10:24 EDT

  None (edit)
Description lkuchlan 2016-02-29 03:31:01 EST
Description of problem:
There is an option to set the quota limit of child project to be bigger than his parent project
It is not reasonable to enable this behaviour.
The maximum quota limit of child project should be as his parent project and not bigger than that

Version-Release number of selected component (if applicable):
python-cinderclient-1.5.0-1.el7ost.noarch
openstack-cinder-7.0.1-6.el7ost.noarch
python-cinder-7.0.1-6.el7ost.noarch

How reproducible:
100%


Steps to Reproduce:
1. Create two projects A and B, when A is the parent of B 
2. Update the quota volumes limit of B(child project) to be bigger than A(parent project) 


Actual results:
Quota limit of child project can be set bigger than limit of his parent project 


Expected results:
Quota limit of child project should not be set bigger than limit of his parent project 

Additional info:

* Creating a parent project:

[stack@instack ~]$  curl -X POST -H "x-auth-token:d8b6ef221a5c41008944030a388a1d81" -H "content-type:application/json" http://192.168.200.180:5000/v3/projects -d '{"project": {"name": "parent_project"}}' |python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   314  100   275  100    39   6279    890 --:--:-- --:--:-- --:--:--  6395
{
    "project": {
        "description": "",
        "domain_id": "default",
        "enabled": true,
        "id": "2f2cb727036e436595309cccbf8ee713",
        "is_domain": false,
        "links": {
            "self": "http://192.168.200.180:5000/v3/projects/2f2cb727036e436595309cccbf8ee713"
        },
        "name": "parent_project",
        "parent_id": null
    }
}

* Creating a child project:

[stack@instack ~]$  curl -X POST -H "x-auth-token:d8b6ef221a5c41008944030a388a1d81" -H "content-type:application/json" http://192.168.200.180:5000/v3/projects -d '{"project": {"name": "child_project", "parent_id": "2f2cb727036e436595309cccbf8ee713"}}' |python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   391  100   304  100    87   5676   1624 --:--:-- --:--:-- --:--:--  5735
{
    "project": {
        "description": "",
        "domain_id": "default",
        "enabled": true,
        "id": "eb91f621211b482d9f30903d9bb3ab1c",
        "is_domain": false,
        "links": {
            "self": "http://192.168.200.180:5000/v3/projects/eb91f621211b482d9f30903d9bb3ab1c"
        },
        "name": "child_project",
        "parent_id": "2f2cb727036e436595309cccbf8ee713"
    }
}


[stack@instack ~]$ cinder quota-show parent_project
+----------------------+-------+
|       Property       | Value |
+----------------------+-------+
|   backup_gigabytes   |  1000 |
|       backups        |   10  |
|      gigabytes       |  1000 |
|  gigabytes_netapp1   |   -1  |
|  gigabytes_netapp2   |   -1  |
| per_volume_gigabytes |   -1  |
|      snapshots       |   10  |
|  snapshots_netapp1   |   -1  |
|  snapshots_netapp2   |   -1  |
|       volumes        |   10  |
|   volumes_netapp1    |   -1  |
|   volumes_netapp2    |   -1  |
+----------------------+-------+

* Setting quota limit volumes of child project bigger than his parent quota limit

[stack@instack ~]$ cinder quota-update child_project --volumes 20
+----------------------+-------+
|       Property       | Value | 
+----------------------+-------+
|   backup_gigabytes   |  1000 |
|       backups        |   10  |
|      gigabytes       |  1000 |
|  gigabytes_netapp1   |   -1  |
|  gigabytes_netapp2   |   -1  |
| per_volume_gigabytes |   -1  |
|      snapshots       |   10  |
|  snapshots_netapp1   |   -1  |
|  snapshots_netapp2   |   -1  |
|       volumes        |   20  |
|   volumes_netapp1    |   -1  |
|   volumes_netapp2    |   -1  |
+----------------------+-------+
Comment 2 Sergey Gotliv 2016-03-02 05:59:50 EST
This is something that would nice to backport to 8.0z but its not a blocker for GA.
Comment 3 Sean Cohen 2016-05-05 09:08:45 EDT
Merged upstream in Mitaka https://review.openstack.org/#/c/282068/

Note You need to log in before you can comment on or make changes to this bug.