nova quota-update should throw error if tenant-id is not correct
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Wishlist
|
Unassigned | ||
python-novaclient |
In Progress
|
Undecided
|
Abhilash Goyal |
Bug Description
According to the help for “nova quota-update” the command works only with tenant-id.
But currently the command works with everything and doesn't check if the user entered a valid tenant-id or not.
The command should check if the tenant-id entered is a valid id and if it that is not the case should result in an error.
Steps to reproduce the bug :
1. Run “keystone tenant-list” command to get the list of the existing tenants
stack@stack:
+------
| id | name | enabled |
+------
| 5484649a676547a
| 8d97085693a740d
| 52eab592d3e94af
| 62bf50f477754e3
| fc32936f81e5400
+------
2. Run the “nova quota-update” command with a valid tenant-id from the list you got using the keystone command
stack@stack:
3. Check if the quota got updated
stack@stack:
+------
| Quota | Limit |
+------
| instances | 8 |
| cores | 20 |
| ram | 51200 |
| floating_ips | 10 |
| fixed_ips | -1 |
| metadata_items | 128 |
| injected_files | 5 |
| injected_
| injected_
| key_pairs | 100 |
| security_groups | 10 |
| security_
| server_groups | 10 |
| server_
+------
As we can see the quota got updated when we used a valid tenant-id. Now lets check what happens if we use a tenant-id that doesn't exits.
4. Run the “nova quota-update” command again using an incorrect tenant-id
stack@stack:
5. Check if the quota got updated for this tenant-id
stack@stack:
+------
| Quota | Limit |
+------
| instances | 8 |
| cores | 20 |
| ram | 51200 |
| floating_ips | 10 |
| fixed_ips | -1 |
| metadata_items | 128 |
| injected_files | 5 |
| injected_
| injected_
| key_pairs | 100 |
| security_groups | 10 |
| security_
| server_groups | 10 |
| server_
+------
So the command updates the quota for a tenant that doesn't exists resulting in a bug for OpenStack.
Changed in python-novaclient: | |
assignee: | nobody → Abhilash Goyal (abhilash-goyal) |
Changed in nova: | |
assignee: | nobody → Abhilash Goyal (abhilash-goyal) |
assignee: | Abhilash Goyal (abhilash-goyal) → nobody |
Fix proposed to branch: master /review. openstack. org/288396
Review: https:/