Bug 1927180 - TripleO fails to apply custom IronicApiPolicies because openstack-ironic-api container image is shipped with /etc/ironic/policy.json in incorrect format
Summary: TripleO fails to apply custom IronicApiPolicies because openstack-ironic-api ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ironic
Version: 16.1 (Train)
Hardware: All
OS: All
high
medium
Target Milestone: z7
: 16.1 (Train on RHEL 8.2)
Assignee: Steve Baker
QA Contact: Paras Babbar
URL:
Whiteboard:
Depends On:
Blocks: 1927181
TreeView+ depends on / blocked
 
Reported: 2021-02-10 09:55 UTC by Alex Stupnikov
Modified: 2021-12-09 20:18 UTC (History)
5 users (show)

Fixed In Version: openstack-ironic-13.0.7-1.20210603224533.3d77e61.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1927181 (view as bug list)
Environment:
Last Closed: 2021-12-09 20:18:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
RDO 33458 0 None None None 2021-04-21 23:32:20 UTC
Red Hat Issue Tracker OSP-1511 0 None None None 2021-11-18 11:29:30 UTC
Red Hat Product Errata RHBA-2021:3762 0 None None None 2021-12-09 20:18:26 UTC

Description Alex Stupnikov 2021-02-10 09:55:48 UTC
Description of problem:

This problem was originally reported by customer with RHOSP 13 deployment. When customer tried deployment command with custom IronicApiPolicies it failed with error [1] (I replaced rule, it is irrelevant in this case).

From customer's investigation it looks like this problem is caused by the fact that openstack-ironic-api container image is shipped with /etc/ironic/policy.json in incorrect JSON format (lots of commented lines, which doesn't look like a valid JSON). It looks like this file is coming from openstack-ironic-common RPM

I have decided to report this bug for RHOSP 16 first because the situation is the same there, although I didn't try to reproduce the problem.


[1]
Warning: Augeas[/etc/ironic/policy.json-RULE-add](provider=augeas): Loading failed for one or more files, see debug for /augeas//error output
Error: /Stage[main]/Ironic::Policy/Openstacklib::Policy::Base[RULE_NAME]/Augeas[/etc/ironic/policy.json-baremetal:RULE-add]: Could not evaluate: Saving failed, see debug


Steps to Reproduce:
1. Define IronicApiPolicies according to our official recommendations and run deployment command

Actual results:
Deployment command fails with error [1] because augeas fails to parse policy.json: https://github.com/openstack/puppet-openstacklib/blob/stable/queens/manifests/policy/base.pp#L48-L57

Expected results:
Custom policies are added to /etc/ironic/policy.json inside ironic_api container and applied.

Comment 40 errata-xmlrpc 2021-12-09 20:18: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 (Red Hat OpenStack Platform 16.1.7 (Train) bug fix and enhancement 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-2021:3762


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