quota-show lists info with wrong tenant-id

Bug #1307475 reported by Tushar Bankar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Anton Arefiev

Bug Description

cinder quota-show wrong-id

cinder returns answer 200 Ok with list of quotas.

But it is expected 404 Not Found.

It is bad, because if we try id which looks like a real tenant-id, but actually is wrong, we will not know which quota we got, current tenant or typed (with mistake).

Changed in cinder:
assignee: nobody → Tushar Bankar (tushar-bankar)
description: updated
tags: added: izeltech
Revision history for this message
Tushar Bankar (tushar-bankar) wrote :

Response:

 cinder quota-show wrong-id
+-----------+-------+
| Property | Value |
+-----------+-------+
| gigabytes | 1000 |
| snapshots | 10 |
| volumes | 10 |
+-----------+-------+

Revision history for this message
Jay Bryant (jsbryant) wrote :

As I mentioned in bug 1307486 I think this is probably related to the code just going down the default path if it isn't able to find the requested tenant. If all else fails, it just reports the defaults. I will try to find here I saw that.

Changed in cinder:
importance: Undecided → Low
status: New → Triaged
Changed in cinder:
assignee: Tushar Bankar (tushar-bankar) → nobody
Changed in cinder:
assignee: nobody → Harshada Mangesh Kakad (harshada-kakad)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/92817

Changed in cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Duncan Thomas (<email address hidden>) on branch: master
Review: https://review.openstack.org/92817
Reason: Abandoning change: No update for more than 14 days

Revision history for this message
Duncan Thomas (duncan-thomas) wrote :

https://review.openstack.org/92817 was no good since a valid tenant with no specific quota set should get the defaults, not 404

tags: added: qutoas
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143645

Changed in cinder:
assignee: Harshada Mangesh Kakad (harshada-kakad) → Anton Arefiev (aarefiev)
Revision history for this message
Huang Zhiteng (zhiteng-huang) wrote :

Is it really necessary to verify project for readonly operation like show quota/quota-usage? It can't do any harm to system. And what if there was some existing tenants and then got removed? Some may say their deployment never remove any tenant, but that is not always true for every deployment.

Revision history for this message
Anton Arefiev (aarefiev) wrote :

I don't see any problem with removed tenant, we'll return not found for it, there is question how to clean up db after that, but I think it isn't problem. Otherwise, as for me, it is confusing behavior if we don't check tenant on show operation and return default value, it is possible that I make mistake in tenant id , and will get wrong quotas, I prefer to get not found error instead.

Revision history for this message
Viktor Tikkanen (viktor-tikkanen) wrote :

This problem seems to be corrected already into Liberty:

[root@sut1-server11 user(keystone_admin)]# cinder quota-show admin
ERROR: Tenant ID: admin does not exist. (HTTP 404) (Request-ID: req-fa9ad582-0aeb-4a93-8aad-7ddd496e15ea)
[root@sut1-server11 user(keystone_admin)]# cinder quota-show d67f37102b7e4a97aa833ee4a069865d
+----------------------+-------+
| Property | Value |
+----------------------+-------+
| backup_gigabytes | 1000 |
| backups | 10 |
| gigabytes | 1000 |
| gigabytes_iscsi | -1 |
| per_volume_gigabytes | -1 |
| snapshots | 10 |
| snapshots_iscsi | -1 |
| volumes | 10 |
| volumes_iscsi | -1 |
+----------------------+-------+
[root@sut1-server11 user(keystone_admin)]#

Revision history for this message
Mitsuhiro Tanino (mitsuhiro-tanino) wrote :

The fix was introduced via commit d8bd178465d5ba69cb60095b2dcdbcf6a311cc2e.

--------------------
commit d8bd178465d5ba69cb60095b2dcdbcf6a311cc2e
Author: Erickson Santos <email address hidden>
Date: Mon Jul 27 15:01:47 2015 -0300

    Nested Quota Driver: Get Project Hierarchy
--------------------

Changed in cinder:
status: In Progress → Fix Committed
Changed in cinder:
status: Fix Committed → Fix Released
Tom Barron (tpb)
tags: added: quotas
removed: qutoas
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.