GET os-quota-class-sets/{anything} returns OK

Bug #1602396 reported by Matthew Edmonds
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Undecided
Gorka Eguileor
OpenStack Compute (nova)
Confirmed
Wishlist
Unassigned

Bug Description

I don't quite understand what a quota class set is, since there is no documentation (see https://bugs.launchpad.net/cinder/+bug/1602400), but no matter what it is the API isn't working properly... You have to specify a class set, but any name you give is accepted, with the only difference in the response being that the "id" returns back whatever name you gave. Surely class sets with these names don't actually exist and the API should be returning an error.

E.g. where class set is "g":
# curl http://localhost:9000/v2/67154cb74e9a45b19423d164f180e2db/os-quota-class-sets/g -H "Accept: application/json" -H "X-Auth-Token: e21820a0fc1147f9baa58fcb08243aa8"; echo
{"quota_class_set": {"per_volume_gigabytes": -1, "gigabytes_svc186 base template": 1000000, "volumes": 100000, "snapshots_svc186 base template": 100000, "gigabytes": 1000000, "backup_gigabytes": 1000, "snapshots": 100000, "volumes_svc186 base template": 100000, "backups": 10, "id": "g"}}

E.g. where class set is "x":
# curl http://localhost:9000/v2/67154cb74e9a45b19423d164f180e2db/os-quota-class-sets/x -H "Accept: application/json" -H "X-Auth-Token: e21820a0fc1147f9baa58fcb08243aa8"; echo
{"quota_class_set": {"per_volume_gigabytes": -1, "gigabytes_svc186 base template": 1000000, "volumes": 100000, "snapshots_svc186 base template": 100000, "gigabytes": 1000000, "backup_gigabytes": 1000, "snapshots": 100000, "volumes_svc186 base template": 100000, "backups": 10, "id": "x"}}

Tags: api
Revision history for this message
Matthew Edmonds (edmondsw) wrote :

same issue found in nova as well as cinder

description: updated
tags: added: api
Revision history for this message
Matt Riedemann (mriedem) wrote :

This is a 'feature', if the quota class doesn't exist, it returns the default quota class values.

Yes, it's terrible.

I'll add this to https://blueprints.launchpad.net/nova/+spec/only-default-quota-class as something to fix but it's going to require a microversion.

Changed in nova:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in nova:
assignee: nobody → Sivasathurappan Radhakrishnan (siva-radhakrishnan)
Changed in nova:
assignee: Sivasathurappan Radhakrishnan (siva-radhakrishnan) → nobody
Revision history for this message
Matt Riedemann (mriedem) wrote :
Gorka Eguileor (gorka)
Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/819691

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/907152

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by "Rajat Dhasmana <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/819691
Reason: in favor of https://review.opendev.org/c/openstack/cinder/+/907152 (since i thought doing it over master would be better, it wasn't)

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.