Bug 1680574 - Unable to dump policy using oslopolicy-policy-generator
Summary: Unable to dump policy using oslopolicy-policy-generator
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 13.0 (Queens)
Hardware: All
OS: Linux
high
high
Target Milestone: z7
: 13.0 (Queens)
Assignee: Nate Johnston
QA Contact: Roee Agiman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-25 10:51 UTC by Pratik Bandarkar
Modified: 2019-07-10 13:02 UTC (History)
5 users (show)

Fixed In Version: openstack-neutron-12.0.5-12.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-10 13:02:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1817953 0 None None None 2019-02-27 19:44:43 UTC
OpenStack gerrit 639842 0 'None' ABANDONED Add enforcer logic for neutron policy sample generation 2020-10-28 02:56:10 UTC
Red Hat Product Errata RHBA-2019:1744 0 None None None 2019-07-10 13:02:12 UTC

Description Pratik Bandarkar 2019-02-25 10:51:42 UTC
Description of problem:
Unable to dump policy using oslopolicy-policy-generator for neutron, glance, swift, heat.

[root@controller03 neutron]# oslopolicy-policy-generator --namespace neutron
WARNING:stevedore.named:Could not load neutron
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 295, in generate_policy
    _generate_policy(conf.namespace, conf.output_file)
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 240, in _generate_policy
    enforcer = _get_enforcer(namespace)
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 78, in _get_enforcer
    enforcer = mgr[namespace].obj
  File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 326, in __getitem__
    return self._extensions_by_name[name]
KeyError: 'neutron'
[root@617153-controller03 neutron]# oslopolicy-policy-generator --namespace network
WARNING:stevedore.named:Could not load network
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 295, in generate_policy
    _generate_policy(conf.namespace, conf.output_file)
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 240, in _generate_policy
    enforcer = _get_enforcer(namespace)
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 78, in _get_enforcer
    enforcer = mgr[namespace].obj
  File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 326, in __getitem__
    return self._extensions_by_name[name]
KeyError: 'network'
[root@617153-controller03 neutron]# oslopolicy-policy-generator --namespace glance
WARNING:stevedore.named:Could not load glance
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 295, in generate_policy
    _generate_policy(conf.namespace, conf.output_file)
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 240, in _generate_policy
    enforcer = _get_enforcer(namespace)
  File "/usr/lib/python2.7/site-packages/oslo_policy/generator.py", line 78, in _get_enforcer
    enforcer = mgr[namespace].obj
  File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 326, in __getitem__
    return self._extensions_by_name[name]
KeyError: 'glance'
Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Deploy RHOS13
2. 
3.

Actual results:
Unable to dump policy using oslopolicy-policy-generator for neutron, glance, swift, heat.

Expected results:
oslopolicy-policy-generator should be able to list configured policies for neutron, glance, swift, heat.

Additional info:
The bug IDs mentioned in https://access.redhat.com/solutions/3182981 are for keystone. are there any different internal bz's to track for other RHOS components?

Comment 1 Nate Johnston 2019-02-25 14:55:29 UTC
This appears to be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1678771 - any reason we can't close this one and just work from the other one?

Comment 2 Nate Johnston 2019-02-27 19:44:43 UTC
Files upstream bug 1817953 for this issue.

Comment 3 Nate Johnston 2019-02-27 21:32:47 UTC
Filed upstream fix for stable/rocky (OSP 14); will backport to 13 once that was fixed.

The reason for the nonstandard process here is that the fix to master was originally a part of a code change to implement the policy-in-code feature.  Policy forbids backporting a feature upstream, so I had to cut it down to just the changes needed for this fix.

Comment 13 errata-xmlrpc 2019-07-10 13:02:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1744


Note You need to log in before you can comment on or make changes to this bug.