Cannot generate policy file

Bug #1625804 reported by Adam Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Vasyl Saienko

Bug Description

The new form of policy enforcement iu

sudo oslopolicy-policy-generator --namespace ironic --output-file /tmp/policy/etc/ironic/policy.json
WARNING:stevedore.named:Could not load ironic
Traceback (most recent call last):
  File "/bin/oslopolicy-policy-generator", line 10, in <module>
    sys.exit(generate_policy())
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 213, in generate_policy
    _generate_policy(conf.namespace, conf.output_file)
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 158, in _generate_policy
    enforcer = _get_enforcer(namespace)
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 74, in _get_enforcer
    enforcer = mgr[namespace].obj
  File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 291, in __getitem__
    return self._extensions_by_name[name]
KeyError: 'ironic'

There is no entry point registered. Using epi ...

(sudo pip install entry-point-inspector)

$ epi group show oslo.policy.enforcer
+------+-------------+--------------+------------------------+-------+
| Name | Module | Member | Distribution | Error |
+------+-------------+--------------+------------------------+-------+
| nova | nova.policy | get_enforcer | nova 14.0.0.0b4.dev168 | |
+------+-------------+--------------+------------------------+-------+

There needs to be an entry point in that group for ironic.

Dmitry Tantsur (divius)
Changed in ironic:
status: New → Triaged
importance: Undecided → Low
tags: added: low-hanging-fruit
Vasyl Saienko (vsaienko)
Changed in ironic:
assignee: nobody → Vasyl Saienko (vsaienko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

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

Reviewed: https://review.openstack.org/380962
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=f17dd1febf974da47be39641e2f5c1b833e087f7
Submitter: Jenkins
Branch: master

commit f17dd1febf974da47be39641e2f5c1b833e087f7
Author: Vasyl Saienko <email address hidden>
Date: Mon Oct 3 10:44:08 2016 +0300

    Add entry_point for oslo policy scripts

    There are two helper scripts in oslo.policy to help deployers understand
    their policy configuration better. With the setup.cfg entry these can be
    called directly from oslo.policy.

    Change-Id: Icfff952f0742b188968603cd3335a3ef50965337
    Closes-Bug: #1625804

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

This issue was fixed in the openstack/ironic 7.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.