← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1523793] [NEW] Nova: Quota limit for meta can be set to smaller than already used

 

Public bug reported:

[Summary]
Quota limit for meta can be set to smaller than already used

[Topo]
devstack all-in-one node

[Description and expect result]
Quota limit for meta can not be set to smaller than already used

[Reproduceable or not]
reproduceable 

[Recreate Steps]
1) current meta quota limit is 10:
root@45-59:/opt/stack/devstack# nova quota-show
+-----------------------------+-------+
| Quota                       | Limit |
+-----------------------------+-------+
| instances                   | 11    |
| cores                       | 20    |
| ram                         | 51200 |
| floating_ips                | 10    |
| fixed_ips                   | -1    |
| metadata_items              | 10    |
| injected_files              | 5     |
| injected_file_content_bytes | 10240 |
| injected_file_path_bytes    | 255   |
| key_pairs                   | 100   |
| security_groups             | 10    |
| security_group_rules        | 20    |
| server_groups               | 10    |
| server_group_members        | 10    |
+-----------------------------+-------+

2)create an instance, and set 2 meta items for the instance:
root@45-59:/opt/stack/devstack# nova meta instance-docker-test set a=1 b=2
root@45-59:/opt/stack/devstack# nova show instance-docker-test 
+--------------------------------------+----------------------------------------------------------------+
| Property                             | Value                                                          |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                         |
| OS-EXT-AZ:availability_zone          | nova                                                           |
| OS-EXT-SRV-ATTR:host                 | 45-59                                                          |
| OS-EXT-SRV-ATTR:hostname             | instance-docker-test                                           |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | 45-59                                                          |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000002                                              |
| OS-EXT-SRV-ATTR:kernel_id            | 9400ca84-438d-404d-a454-f1764c105a38                           |
| OS-EXT-SRV-ATTR:launch_index         | 0                                                              |
| OS-EXT-SRV-ATTR:ramdisk_id           | 50aadc88-c755-418b-912f-a1ce4c91ddce                           |
| OS-EXT-SRV-ATTR:reservation_id       | r-10jntt4r                                                     |
| OS-EXT-SRV-ATTR:root_device_name     | /dev/vda                                                       |
| OS-EXT-SRV-ATTR:user_data            | -                                                              |
| OS-EXT-STS:power_state               | 1                                                              |
| OS-EXT-STS:task_state                | -                                                              |
| OS-EXT-STS:vm_state                  | active                                                         |
| OS-SRV-USG:launched_at               | 2015-12-08T15:19:30.000000                                     |
| OS-SRV-USG:terminated_at             | -                                                              |
| accessIPv4                           |                                                                |
| accessIPv6                           |                                                                |
| config_drive                         | True                                                           |
| created                              | 2015-12-08T15:19:23Z                                           |
| flavor                               | m1.tiny (1)                                                    |
| hostId                               | f8d5a16aa9a8b55e358ed62cc40ae216c1e025bc991c6b71f7898830       |
| id                                   | 2e332fba-7c31-4271-9443-b36ef7cc76c2                           |
| image                                | cirros-0.3.4-x86_64-uec (6ec79afd-b705-44c1-926c-7e29c2521318) |
| key_name                             | -                                                              |
| metadata                             | {"a": "1", "b": "2"}                                           |
| name                                 | instance-docker-test                                           |
| net1 network                         | 1.0.0.4                                                        |
| os-extended-volumes:volumes_attached | []                                                             |
| progress                             | 0                                                              |
| security_groups                      | default                                                        |
| status                               | ACTIVE                                                         |
| tenant_id                            | f75256da799642e0ab597a7533918714                               |
| updated                              | 2015-12-08T15:45:40Z                                           |
| user_id                              | ac0147b65d864804aec02d21cce07991                               |
+--------------------------------------+----------------------------------------------------------------+
root@45-59:/opt/stack/devstack# 

3)set the meta quota limit to 1, succeeded:                     >>>ISSUE,actually there are 2 meta items existing, should return error info here.
root@45-59:/opt/stack/devstack# nova quota-update --metadata-items 1 f75256da799642e0ab597a7533918714
root@45-59:/opt/stack/devstack# 
root@45-59:/opt/stack/devstack# nova quota-show
+-----------------------------+-------+
| Quota                       | Limit |
+-----------------------------+-------+
| instances                   | 11    |
| cores                       | 20    |
| ram                         | 51200 |
| floating_ips                | 10    |
| fixed_ips                   | -1    |
| metadata_items              | 1     |  >>>ISSUE
| injected_files              | 5     |
| injected_file_content_bytes | 10240 |
| injected_file_path_bytes    | 255   |
| key_pairs                   | 100   |
| security_groups             | 10    |
| security_group_rules        | 20    |
| server_groups               | 10    |
| server_group_members        | 10    |
+-----------------------------+-------+
root@45-59:/opt/stack/devstack#

[Configration]
reproduceable bug, no need

[logs]
reproduceable bug, no need

[Root cause anlyze or debug inf]
reproduceable bug

[Attachment]
None

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1523793

Title:
  Nova: Quota limit for meta can be set to smaller than already used

Status in OpenStack Compute (nova):
  New

Bug description:
  [Summary]
  Quota limit for meta can be set to smaller than already used

  [Topo]
  devstack all-in-one node

  [Description and expect result]
  Quota limit for meta can not be set to smaller than already used

  [Reproduceable or not]
  reproduceable 

  [Recreate Steps]
  1) current meta quota limit is 10:
  root@45-59:/opt/stack/devstack# nova quota-show
  +-----------------------------+-------+
  | Quota                       | Limit |
  +-----------------------------+-------+
  | instances                   | 11    |
  | cores                       | 20    |
  | ram                         | 51200 |
  | floating_ips                | 10    |
  | fixed_ips                   | -1    |
  | metadata_items              | 10    |
  | injected_files              | 5     |
  | injected_file_content_bytes | 10240 |
  | injected_file_path_bytes    | 255   |
  | key_pairs                   | 100   |
  | security_groups             | 10    |
  | security_group_rules        | 20    |
  | server_groups               | 10    |
  | server_group_members        | 10    |
  +-----------------------------+-------+

  2)create an instance, and set 2 meta items for the instance:
  root@45-59:/opt/stack/devstack# nova meta instance-docker-test set a=1 b=2
  root@45-59:/opt/stack/devstack# nova show instance-docker-test 
  +--------------------------------------+----------------------------------------------------------------+
  | Property                             | Value                                                          |
  +--------------------------------------+----------------------------------------------------------------+
  | OS-DCF:diskConfig                    | MANUAL                                                         |
  | OS-EXT-AZ:availability_zone          | nova                                                           |
  | OS-EXT-SRV-ATTR:host                 | 45-59                                                          |
  | OS-EXT-SRV-ATTR:hostname             | instance-docker-test                                           |
  | OS-EXT-SRV-ATTR:hypervisor_hostname  | 45-59                                                          |
  | OS-EXT-SRV-ATTR:instance_name        | instance-00000002                                              |
  | OS-EXT-SRV-ATTR:kernel_id            | 9400ca84-438d-404d-a454-f1764c105a38                           |
  | OS-EXT-SRV-ATTR:launch_index         | 0                                                              |
  | OS-EXT-SRV-ATTR:ramdisk_id           | 50aadc88-c755-418b-912f-a1ce4c91ddce                           |
  | OS-EXT-SRV-ATTR:reservation_id       | r-10jntt4r                                                     |
  | OS-EXT-SRV-ATTR:root_device_name     | /dev/vda                                                       |
  | OS-EXT-SRV-ATTR:user_data            | -                                                              |
  | OS-EXT-STS:power_state               | 1                                                              |
  | OS-EXT-STS:task_state                | -                                                              |
  | OS-EXT-STS:vm_state                  | active                                                         |
  | OS-SRV-USG:launched_at               | 2015-12-08T15:19:30.000000                                     |
  | OS-SRV-USG:terminated_at             | -                                                              |
  | accessIPv4                           |                                                                |
  | accessIPv6                           |                                                                |
  | config_drive                         | True                                                           |
  | created                              | 2015-12-08T15:19:23Z                                           |
  | flavor                               | m1.tiny (1)                                                    |
  | hostId                               | f8d5a16aa9a8b55e358ed62cc40ae216c1e025bc991c6b71f7898830       |
  | id                                   | 2e332fba-7c31-4271-9443-b36ef7cc76c2                           |
  | image                                | cirros-0.3.4-x86_64-uec (6ec79afd-b705-44c1-926c-7e29c2521318) |
  | key_name                             | -                                                              |
  | metadata                             | {"a": "1", "b": "2"}                                           |
  | name                                 | instance-docker-test                                           |
  | net1 network                         | 1.0.0.4                                                        |
  | os-extended-volumes:volumes_attached | []                                                             |
  | progress                             | 0                                                              |
  | security_groups                      | default                                                        |
  | status                               | ACTIVE                                                         |
  | tenant_id                            | f75256da799642e0ab597a7533918714                               |
  | updated                              | 2015-12-08T15:45:40Z                                           |
  | user_id                              | ac0147b65d864804aec02d21cce07991                               |
  +--------------------------------------+----------------------------------------------------------------+
  root@45-59:/opt/stack/devstack# 

  3)set the meta quota limit to 1, succeeded:                     >>>ISSUE,actually there are 2 meta items existing, should return error info here.
  root@45-59:/opt/stack/devstack# nova quota-update --metadata-items 1 f75256da799642e0ab597a7533918714
  root@45-59:/opt/stack/devstack# 
  root@45-59:/opt/stack/devstack# nova quota-show
  +-----------------------------+-------+
  | Quota                       | Limit |
  +-----------------------------+-------+
  | instances                   | 11    |
  | cores                       | 20    |
  | ram                         | 51200 |
  | floating_ips                | 10    |
  | fixed_ips                   | -1    |
  | metadata_items              | 1     |  >>>ISSUE
  | injected_files              | 5     |
  | injected_file_content_bytes | 10240 |
  | injected_file_path_bytes    | 255   |
  | key_pairs                   | 100   |
  | security_groups             | 10    |
  | security_group_rules        | 20    |
  | server_groups               | 10    |
  | server_group_members        | 10    |
  +-----------------------------+-------+
  root@45-59:/opt/stack/devstack#

  [Configration]
  reproduceable bug, no need

  [logs]
  reproduceable bug, no need

  [Root cause anlyze or debug inf]
  reproduceable bug

  [Attachment]
  None

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


Follow ups