"nova quota-show --tenant <tenant-id> | --user <user-id>" does not check valid id

Bug #1366145 reported by Danny Choi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

OpenStack version: icehouse

Issue: "nova quota-show --tenant <tenant-id> | --user <user-id>" does not check for valid id. User can enter a bogus value and the show command still successfully executed.

Steps to reproduce:
1. Run the command with a bogus id for tenant-id or user-id.
2. Notice there is no error and the command is executed successfully.

E.g.

ubuntu@Controller:~/devstack$ keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 83407b1b2f90424aa9194537c561ffe7 | admin | True |
| 834274b5f9664eaa96ac4f533573ddc6 | alt_demo | True |
| 627dbdbadbf34435a9e5bcfeee84c9cf | demo | True |
| 9c162cf03fa0471890896c1a9675bc41 | invisible_to_admin | True |
| e967d023b36d4946b9216a6a3aac009d | service | True |
+----------------------------------+--------------------+---------+
ubuntu@Controller:~/devstack$ keystone user-list
+----------------------------------+-------------------+---------+---------------------+
| id | name | enabled | email |
+----------------------------------+-------------------+---------+---------------------+
| 2591e49ad0f1441c9b64e39c27447cf1 | admin | True | <email address hidden> |
| 1db42489e32b49a39026e25f22ac2c72 | alt_demo | True | |
| a6ff4c220a8e4d84a346886a24f6da12 | cinder | True | <email address hidden> |
| 40e3c288952146d3b16be3f103eb20fd | demo | True | <email address hidden> |
| adf48c3b98d44683a85ef033a52c33e3 | glance | True | |
| 08cd70f47fe24522baf066c7c6c6fe67 | heat | True | <email address hidden> |
| ad2b1ffd5fda45d3b84d1c3bdaade13d | heat_domain_admin | True | |
| c3d11a325d594cf3a89c429cf6d5c07f | neutron | True | <email address hidden> |
| 235abf3bded84cca8beb6b3147f8ef9c | nova | True | <email address hidden> |
+----------------------------------+-------------------+---------+---------------------+

ubuntu@Controller:~/devstack$ nova help quota-show
usage: nova quota-show [--tenant <tenant-id>] [--user <user-id>]

List the quotas for a tenant/user.

Optional arguments:
  --tenant <tenant-id> ID of tenant to list the quotas for.
  --user <user-id> ID of user to list the quotas for.

ubuntu@Controller:~/devstack$ nova quota-show --tenant bogus <<<<< bogus value for tenant-id
+-----------------------------+-------+
| 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 |
+-----------------------------+-------+
ubuntu@Controller:~/devstack$ nova quota-show --user bogus <<<<< bogus value for user-id
+-----------------------------+-------+
| 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 |
+-----------------------------+-------+

Tags: nova
Revision history for this message
Thang Pham (thang-pham) wrote :

This is a know bug for several months now. I am trying to get a blueprint approved to fix it: https://blueprints.launchpad.net/nova/+spec/validate-tenant-user-with-keystone

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.