user quota not properly work with project quota

Bug #1205582 reported by Liyingjun
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Liyingjun
oslo-incubator
Fix Released
Undecided
Liyingjun

Bug Description

When user quota is not set, it's not restricted by the project quota.

Reproduce:
1. Set project quota:
# nova-manage project quota --project 846576498dc24660943784e25e2b5b1a --key instances --value 3
Quota Limit In Use Reserved
metadata_items 128 0 0
injected_file_content_bytes 10240 0 0
ram 51200 0 0
floating_ips 10 0 0
security_group_rules 20 0 0
instances 3 0 0
key_pairs 100 0 0
injected_files 5 0 0
cores 20 0 0
fixed_ips unlimited 0 0
injected_file_path_bytes 255 0 0
security_groups 10 0 0

2. get the users for project.
# keystone user-list --tenant-id 846576498dc24660943784e25e2b5b1a
+----------------------------------+--------+---------+-----------------+
| id | name | enabled | email |
+----------------------------------+--------+---------+-----------------+
| 6a120d1a6034481fa7e905d422dceb76 | test | True | <email address hidden> |
+----------------------------------+--------+---------+-----------------+

3. get user quota.
# nova-manage project quota --project 846576498dc24660943784e25e2b5b1a --user 6a120d1a6034481fa7e905d422dceb76
metadata_items 128 0 0
injected_file_content_bytes 10240 0 0
ram 51200 0 0
floating_ips 10 0 0
security_group_rules 20 0 0
instances 2 0 0
key_pairs 100 0 0
injected_files 5 0 0
cores 20 0 0
fixed_ips unlimited 0 0
injected_file_path_bytes 255 0 0
security_groups 10 0 0

Instances quota for user should be 3, but in fact it's 2, and 2 is the default quota i have set in the config file.

Liyingjun (liyingjun)
Changed in nova:
assignee: nobody → Liyingjun (liyingjun)
Kylin CG (kylin7-sg)
Changed in nova:
status: New → Confirmed
Liyingjun (liyingjun)
description: updated
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/38966

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/38966
Committed: http://github.com/openstack/nova/commit/2c84198f2b239d43bfc2a8b33465797280a34df2
Submitter: Jenkins
Branch: master

commit 2c84198f2b239d43bfc2a8b33465797280a34df2
Author: liyingjun <email address hidden>
Date: Sun Jul 28 22:49:38 2013 +0800

    Use project quota as default user quota

        * Add the missing db_api test cases for user quota.
        * Fixes bug 1205582

    Change-Id: Iba8702b4d6d67ef6bb3257a39da3838424d0cd07

Changed in nova:
status: In Progress → Fix Committed
Changed in oslo:
assignee: nobody → Liyingjun (liyingjun)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/40779
Committed: http://github.com/openstack/oslo-incubator/commit/4d5ce859c61e24b287be33a2b821aded3577cddb
Submitter: Jenkins
Branch: master

commit 4d5ce859c61e24b287be33a2b821aded3577cddb
Author: liyingjun <email address hidden>
Date: Thu Aug 8 09:24:40 2013 +0800

    User quota update should not exceed project quota

    When user quota is not set, the default quota set in
    config file will be used as the default user quota,
    this will break the logic of user quota (the default
    user quota should be restricted by the project quota)

    Fixes bug 1208400
    Fixes bug 1205582

    Change-Id: Id98d504d8f5e0dda642fa5e7c550acea79520c3d

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