← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1449536] Re: For the first time,Modify the user quota can destroy the rule "user quota summation should not exceed the tenant quota"

 

[Expired for OpenStack Compute (nova) because there has been no activity
for 60 days.]

** Changed in: nova
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1449536

Title:
  For the first time,Modify the user quota can destroy the rule "user
  quota summation should not exceed the tenant quota"

Status in OpenStack Compute (Nova):
  Expired

Bug description:
  1.version:icehouse

  2.Reproduce steps:
  2.1
  I create a tenant called tenant_test 
  then I cretaed three users called test1,test2 and test3 which belong tenant tenant_test

  [root@njq002 ~(keystone_admin)]# keystone tenant-list
  +----------------------------------+-------------+---------+
  |                id                |     name    | enabled |
  +----------------------------------+-------------+---------+
  | 6485ffa6b1f448919f00acab23207018 |    admin    |   True  |
  | dc09e51878b54448b6ed39522295bb5a |   services  |   True  |
  | 46662e5f16ca4721a80608d7f9212b52 | tenant_test |   True  |
  +----------------------------------+-------------+---------+
  [root@njq002 ~(keystone_admin)]# keystone user-list --tenant tenant_test
  +----------------------------------+-------+---------+-------+
  |                id                |  name | enabled | email |
  +----------------------------------+-------+---------+-------+
  | c0f29a1994bb4235be20b41f90429867 | test1 |   True  |       |
  | e7630f66f4be4f5eafc78eddf0699d0c | test2 |   True  |       |
  | 3f5160c6b0a04a81992b9319a89ffa79 | test3 |   True  |       |
  +----------------------------------+-------+---------+-------+

  At this time,There is no any information of three users in table "nova
  . project_user_quotas"

  2.2
  then, With the command "nova quota-update" to change the quota of each user
  [root@njq002 ~(keystone_admin)]# nova quota-update 46662e5f16ca4721a80608d7f9212b52  --user c0f29a1994bb4235be20b41f90429867  --instances 6
  [root@njq002 ~(keystone_admin)]# nova quota-update 46662e5f16ca4721a80608d7f9212b52  --user e7630f66f4be4f5eafc78eddf0699d0c  --instances 7
  [root@njq002 ~(keystone_admin)]# nova quota-update 46662e5f16ca4721a80608d7f9212b52  --user 3f5160c6b0a04a81992b9319a89ffa79  --instances 6

  At this time,There is   relevant information of three users in table
  "nova . project_user_quotas"

  2.3
  we check the tenant quota and user quota ,we will found that the rule "user quota summation should not exceed the tenant quota" has been broken. 
  because 6+7+6 > 10
  [root@njq002 ~(keystone_admin)]# nova quota-show  --tenant  46662e5f16ca4721a80608d7f9212b52
  +-----------------------------+-------+
  | Quota                       | Limit |
  +-----------------------------+-------+
  | instances                   | 10    |
  | cores                       | 20    |
  | ram                         | 51200 |
  | floating_ips                | 10    |
  | fixed_ips                   | -1    |
  | metadata_items              | 128   |
  | injected_files              | 5     |
  | injected_file_content_bytes | 10240 |
  | injected_file_path_bytes    | 255   |
  | key_pairs                   | 100   |
  | security_groups             | 10    |
  | security_group_rules        | 20    |
  +-----------------------------+-------+
  [root@njq002 ~(keystone_admin)]# nova quota-show  --tenant  46662e5f16ca4721a80608d7f9212b52  --user c0f29a1994bb4235be20b41f90429867
  +-----------------------------+-------+
  | Quota                       | Limit |
  +-----------------------------+-------+
  | instances                   | 6     |
  | cores                       | 20    |
  | ram                         | 51200 |
  | floating_ips                | 10    |
  | fixed_ips                   | -1    |
  | metadata_items              | 128   |
  | injected_files              | 5     |
  | injected_file_content_bytes | 10240 |
  | injected_file_path_bytes    | 255   |
  | key_pairs                   | 100   |
  | security_groups             | 10    |
  | security_group_rules        | 20    |
  +-----------------------------+-------+
  [root@njq002 ~(keystone_admin)]# nova quota-show  --tenant  46662e5f16ca4721a80608d7f9212b52  --user e7630f66f4be4f5eafc78eddf0699d0c
  +-----------------------------+-------+
  | Quota                       | Limit |
  +-----------------------------+-------+
  | instances                   | 7     |
  | cores                       | 20    |
  | ram                         | 51200 |
  | floating_ips                | 10    |
  | fixed_ips                   | -1    |
  | metadata_items              | 128   |
  | injected_files              | 5     |
  | injected_file_content_bytes | 10240 |
  | injected_file_path_bytes    | 255   |
  | key_pairs                   | 100   |
  | security_groups             | 10    |
  | security_group_rules        | 20    |
  +-----------------------------+-------+
  [root@njq002 ~(keystone_admin)]# nova quota-show  --tenant  46662e5f16ca4721a80608d7f9212b52  --user 3f5160c6b0a04a81992b9319a89ffa79
  +-----------------------------+-------+
  | Quota                       | Limit |
  +-----------------------------+-------+
  | instances                   | 6     |
  | cores                       | 20    |
  | ram                         | 51200 |
  | floating_ips                | 10    |
  | fixed_ips                   | -1    |
  | metadata_items              | 128   |
  | injected_files              | 5     |
  | injected_file_content_bytes | 10240 |
  | injected_file_path_bytes    | 255   |
  | key_pairs                   | 100   |
  | security_groups             | 10    |
  | security_group_rules        | 20    |
  +-----------------------------+-------+

  2.4
  at last,  With the command "nova quota-update" to change the quota of any user,the result is:

  [root@njq002 ~(keystone_admin)]# nova quota-update 46662e5f16ca4721a80608d7f9212b52  --user e7630f66f4be4f5eafc78eddf0699d0c  --instances 6
  ERROR: Quota limit must be less than -2. (HTTP 400) (Request-ID: req-77dd07f0-0491-4520-a48d-489b3b64238f)

  so, For the first time,Modify the user quota can destroy the rule
  "user quota summation should not exceed the tenant quota"

  this bug and the bug"https://bugs.launchpad.net/nova/+bug/1449498";
  lead to users and tenants quota management is very chaotic

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1449536/+subscriptions