Quotas commands do not work

Bug #1738305 reported by Shu Muto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
High
Spyros Trigazis

Bug Description

When running quotas-* command, we get following error.
"Policy doesn't allow quota:* to be performed."

Definitions of policies for quotas seem to have misspell at follow.

https://github.com/openstack/magnum/blob/c14af5c023f7c614bb17b03762ff50114bb5a9b0/magnum/common/policies/quota.py#L18

Changing above line to "QUOTA = 'quota:%s'", i.e. remove 's' from 'quotas', quotas-* commands works fine.

See details as follows:

- command

magnum quotas-show --project-id c9c01be0ee774ca9ac78189727b7376b --resource Cluster
ERROR: Policy doesn't allow quota:get to be performed (HTTP 403) (Request-ID: req-1e92f690-dd18-4a90-bde3-d4a159dcd20e)

- logs

Dec 14 17:05:16 devstack magnum-api[16153]: 2017-12-14 17:05:16.189 DEBUG oslo_policy._cache_handler [req-a720b4b8-26b1-47d4-b088-db7ca3fffd0c admin admin] Reloading cached file /etc/magnum/policy.yaml from (pid=16485) read_cached_file /usr/local/lib/python2.7/dist-packages/oslo_policy/_cache_handler.py:40
Dec 14 17:05:16 devstack magnum-api[16153]: 2017-12-14 17:05:16.198 DEBUG oslo_policy.policy [req-a720b4b8-26b1-47d4-b088-db7ca3fffd0c admin admin] Reloaded policy file: /etc/magnum/policy.yaml from (pid=16485) _load_policy_file /usr/local/lib/python2.7/dist-packages/oslo_policy/policy.py:742
Dec 14 17:05:16 devstack magnum-api[16153]: 2017-12-14 17:05:16.222 DEBUG oslo_policy.policy [req-5ce6a30c-0593-4203-a419-3f31e4b49f64 None None] Rule [quota:get] does not exist from (pid=16485) enforce /usr/local/lib/python2.7/dist-packages/oslo_policy/policy.py:809
Dec 14 17:05:16 devstack magnum-api[16153]: 2017-12-14 17:05:16.222 DEBUG wsme.api [req-5ce6a30c-0593-4203-a419-3f31e4b49f64 None None] Client-side error: Policy doesn't allow quota:get to be performed. from (pid=16485) format_exception /usr/local/lib/python2.7/dist-packages/wsme/api.py:222
Dec 14 17:05:16 devstack magnum-api[16153]: 2017-12-14 17:05:16.223 INFO werkzeug [req-5ce6a30c-0593-4203-a419-3f31e4b49f64 None None] 172.18.220.6 - - [14/Dec/2017 17:05:16] "GET /v1/quotas/c9c01be0ee774ca9ac78189727b7376b/Cluster HTTP/1.1" 403 -

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
assignee: nobody → Shu Muto (shu-mutou)
status: New → In Progress
yatin (yatinkarel)
Changed in magnum:
importance: Undecided → High
Changed in magnum:
assignee: Shu Muto (shu-mutou) → Spyros Trigazis (strigazi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/528137
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=130ebbe5d66b67ac0e38187934ed3348627bdab9
Submitter: Zuul
Branch: master

commit 130ebbe5d66b67ac0e38187934ed3348627bdab9
Author: Shu Muto <email address hidden>
Date: Fri Dec 15 09:40:11 2017 +0900

    Fix policies for quotas

    This patch fixes policies for quotas to work quotas-* commands.

    Change-Id: I1d61bcb3a4fd4b93a5f42eb2c440d2a22c673a0b
    Closes-Bug: #1738305

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 6.0.0

This issue was fixed in the openstack/magnum 6.0.0 release.

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.