Designate quota commands should be checked against invalid tenant id
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Designate |
Invalid
|
Undecided
|
Unassigned |
Bug Description
while running the following quota commands with tenant id as 'None' we do not get any error message.
dev@dev-2:~$ designate quota-get None
+------
| Field | Value |
+------
| api_export_size | 1000 |
| domains | 10 |
| domain_recordsets | 500 |
| recordset_records | 20 |
| domain_records | 500 |
+------
dev@dev-2:~$ designate quota-update None --domains 20
+------
| Field | Value |
+------
| api_export_size | 1000 |
| domains | 20 |
| domain_recordsets | 500 |
| recordset_records | 20 |
| domain_records | 500 |
+------
dev@dev-2:~$ designate quota-reset None
An appropriate error is expected for invalid tenant id for all quota commands .
Designate has a set of default quotas that are returned for every user, unless specified differently in the quotas table.
What's happening here is the default quotas are being returned, and then a specific one is being set for a user with tenant name 'None'.
This has no effect.
Designate doesn't have a way of checking a tenant is valid before setting a quota, the best it could do is see if that tenant is in Designate in some other fashion (has zones or something). But that doesn't really work for new tenants. So this is probably just something to live with.