Quotas can be set differently on same project if using project name or ID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Designate |
Fix Released
|
Undecided
|
Pavlo Shchelokovskyy |
Bug Description
OpenStack Designate allows to set quotas on a project with its ID and name independently
Steps to reproduce:
(openstack) project list
+------
| ID | Name |
+------
| 58c7fbb2d905413
| aa4dcc3bc5ae472
+------
(openstack) dns quota set --zones 3 --project demo +------
| Field | Value |
+------
| api_export_size | 1000 |
| recordset_records | 20 |
| zone_records | 500 |
| zone_recordsets | 500 |
| zones | 3 |
+------
Now set quota for the same project, but address it by id:
(openstack) dns quota set --zones 4 --project aa4dcc3bc5ae472
+------
| Field | Value |
+------
| api_export_size | 1000 |
| recordset_records | 20 |
| zone_records | 500 |
| zone_recordsets | 500 |
| zones | 4 |
+------
We addressed the same project firstly by name, and secondly by id. Anyway, --project option for client is not supported officially, but supported --project-id gives the same result
In DB we have both quotas records pointing to the same project:
mysql> select * from quotas;
+------
| id | version | created_at | updated_at | tenant_id | resource | hard_limit |
+------
| 01871011140d473
| 57b2dacc2dae49a
| a0cf6df1d352428
+------
3 rows in set (0.00 sec)
Changed in designate: | |
status: | New → Confirmed |
Users can currently set the project-id to any string - we do not verify that the project ID is valid (as we can't - only keystone has the list of projects).
When checking a projects quotas, we only check for the project ID, and do not use the project name at all.
the --project and --project-id issue is a "feature" of the CLI library we use - it will expand shortened flags