Bug 1832920

Summary: puppet/extraconfig/pre_deploy/per_node.yaml does not work with py3
Product: Red Hat OpenStack Reporter: Giulio Fidente <gfidente>
Component: openstack-tripleo-heat-templatesAssignee: Giulio Fidente <gfidente>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: high Docs Contact:
Priority: high    
Version: 16.0 (Train)CC: amcleod, gael_rehault, kholtz, mburns, mgarciac
Target Milestone: rcKeywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-0.20200530033438.0dfce4e.el8ost Doc Type: Bug Fix
Doc Text:
Before this update, the `ExtraConfigPre` `per_node` script was not compatible with Python 3. As a result, the overcloud deployment failed at the step `TASK [Run deployment NodeSpecificDeployment]` with the message `SyntaxError: invalid syntax`. + With this update, the `ExtraConfigPre` `per_node` script is compatible with Python 3 and you can provision custom `per_node` hieradata.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-29 07:52:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1595325, 1715964    

Description Giulio Fidente 2020-05-07 13:37:18 UTC
Enabling per_node ExtraConfigPre will cause error on deployments because the embedded python code doesn't work with py3

For example:

print json.dumps(cnt.get('4C4C4544-0059-4610-8032-C7C04F584B32', {}))

Comment 5 Alex McLeod 2020-06-16 12:29:51 UTC
If this bug requires doc text for errata release, please set the 'Doc Type' and provide draft text according to the template in the 'Doc Text' field. The documentation team will review, edit, and approve the text.

If this bug does not require doc text, please set the 'requires_doc_text' flag to '-'.

Comment 7 David Rosenfeld 2020-07-07 22:48:28 UTC
Verified by creating ceph-osd-config.yaml file that contained:

resource_registry:
  OS::TripleO::CephStorageExtraConfigPre: /usr/share/openstack-tripleo-heat-templates/puppet/extraconfig/pre_deploy/per_node.yaml

and some parameter_defaults.


Added -e /home/stack/templates/ceph-osd-config.yaml to deployment command. After executing deployment the error: 'SyntaxError: invalid syntax' was no longer seen in the step:
TASK [Run deployment NodeSpecificDeployment]

Comment 9 errata-xmlrpc 2020-07-29 07:52:21 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-2020:3148