Unable to dump policy using oslopolicy-policy-generator for glance

Bug #1816647 reported by Cyril Roelandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Cyril Roelandt

Bug Description

Steps to reproduce:

$ cd glance/ # Using the master branch
$ python3 -m venv vvv
(vvv) $ source vvv/bin/activate
(vvv) $ pip install oslo.policy
(vvv) $ pip install -r requirements.txt
(vvv) $ python setup.py install
(vvv) $ oslopolicy-policy-generator --namespace glance
WARNING:stevedore.named:Could not load glance
Traceback (most recent call last):
  File "/home/cyril/tmp/oslopo/glance/vvv/bin/oslopolicy-policy-generator", line 10, in <module>
    sys.exit(generate_policy())
  File "/home/cyril/tmp/oslopo/glance/vvv/lib/python3.7/site-packages/oslo_policy/generator.py", line 338, in generate_policy
    _generate_policy(conf.namespace, conf.output_file)
  File "/home/cyril/tmp/oslopo/glance/vvv/lib/python3.7/site-packages/oslo_policy/generator.py", line 283, in _generate_policy
    enforcer = _get_enforcer(namespace)
  File "/home/cyril/tmp/oslopo/glance/vvv/lib/python3.7/site-packages/oslo_policy/generator.py", line 87, in _get_enforcer
    enforcer = mgr[namespace].obj
  File "/home/cyril/tmp/oslopo/glance/vvv/lib/python3.7/site-packages/stevedore/extension.py", line 326, in __getitem__
    return self._extensions_by_name[name]
KeyError: 'glance'

Changed in glance:
assignee: nobody → Cyril Roelandt (cyril-roelandt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/637985
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=517d8d66c3083bdbe85784ade73d85d0b4ddd83b
Submitter: Zuul
Branch: master

commit 517d8d66c3083bdbe85784ade73d85d0b4ddd83b
Author: Cyril Roelandt <email address hidden>
Date: Tue Feb 19 20:32:11 2019 +0100

    Add an oslo.policy.enforcer entrypoint

    This will allow oslopolicy-policy-generator to generate useful
    information about Glance policies.

    Change-Id: I3aeeeb67d19832ad72f0ab06c8adc0b018020c71
    Closes-Bug: #1816647

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/644994

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/644996

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 18.0.0.0rc1

This issue was fixed in the openstack/glance 18.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (stable/rocky)

Change abandoned by Cyril Roelandt (<email address hidden>) on branch: stable/rocky
Review: https://review.opendev.org/644994

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (stable/queens)

Change abandoned by Cyril Roelandt (<email address hidden>) on branch: stable/queens
Review: https://review.opendev.org/644996
Reason: New feature more than a bug fix.

Erno Kuvaja (jokke)
Changed in glance:
milestone: none → stein-rc1
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.