Bug 1976919

Summary: Command openstack overcloud deploy fails
Product: Red Hat OpenStack Reporter: Gleb Galkin <ggalkin>
Component: openstack-tripleo-commonAssignee: Alex Schultz <aschultz>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: high Docs Contact:
Priority: high    
Version: 16.2 (Train)CC: aschultz, bshephar, jjoyce, jpretori, jschluet, mburns, ravsingh, shrjoshi, slinaber, spower, tkajinam, tvignaud
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-common-11.6.1-2.20210603180855.el8ost.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1977239 (view as bug list) Environment:
Last Closed: 2021-09-15 07:16:23 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: 1975880, 1977239    
Attachments:
Description Flags
ansible.log none

Description Gleb Galkin 2021-06-28 14:36:37 UTC
Created attachment 1795463 [details]
ansible.log

Description of problem:

Command openstack overcloud deploy fails. The ansible.log is attached.
I presume that error is connected with hiera and puppet, I found these in ansible.log:


2021-06-25 10:07:10,549 p=1044 u=mistral n=ansible | 2021-06-25 10:07:10.547788 | fa163eb3-9b85-a684-abe1-000000000826 |      FATAL | Run puppet on the host to apply IPtables rules | rhosp16-overcloud-cont-18492-1 | error={"changed": true, "cmd": "set +e
puppet apply --debug --verbose --detailed-exitcodes --summarize --color=false    --modulepath '/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules' --tags 'tripleo::firewall::rule' -e 'if hiera('enable_load_balancer', true) { class {'::tripleo::haproxy': use_internal_certificates => false, manage_firewall => hiera('tripleo::firewall::manage_firewall', true), }}'
rc=$?
set -e
set +ux
if [ $rc -eq 2 -o $rc -eq 0 ]; then
    exit 0
fi
exit $rc
", "delta": "0:00:09.624070", "end": "2021-06-25 10:07:10.481612", "msg": "non-zero return code", "rc": 1, "start": "2021-06-25 10:07:00.857542", "stderr": "Warning: The function 'hiera' is deprecated in favor of using 'lookup'. See https://puppet.com/docs/puppet/5.5/deprecated_language.html\
   (file & line not available)
Warning: /etc/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5
   (file: /etc/puppet/hiera.yaml)
Error: Evaluation Error: Error while evaluating a Function Call, Lookup of key 'lookup_options' failed:  The Lookup Configuration at '/etc/puppet/hiera.yaml' has wrong type, unrecognized key 'changed'
  The Lookup Configuration at '/etc/puppet/hiera.yaml' has wrong type, unrecognized key 'skip_reason'
  The Lookup Configuration at '/etc/puppet/hiera.yaml' has wrong type, unrecognized key 'skipped' (line: 1, column: 4) on node 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Alex Schultz 2021-06-28 15:05:46 UTC
We don't have a reference to lookup_options in puppet-tripleo.  Can you run with ConfigDebug: True and provide additional logs? Additionally can you provide rpm versions and a sosreport?

Comment 2 Alex Schultz 2021-06-28 15:21:17 UTC
I've identified the issue.  Working on a fix.  The issue is that an ansible task is overwriting the var we used to generate the hiera.yaml configuration.

Comment 6 David Rosenfeld 2021-07-02 12:42:38 UTC
Created templates as described by these two links:

https://review.opendev.org/c/openstack/tripleo-heat-templates/+/798328/3/ci/extraconfig/pre_network/default.yaml

https://review.opendev.org/c/openstack/tripleo-heat-templates/+/798328/3/ci/environments/compute-prenetwork.yaml

Added as environment file to deploy command. After deploy this was seen on compute node:

[heat-admin@compute-0 ~]$ more /etc/pre-network
pre network
Thu Jul  1 20:19:18 UTC 2021

Comment 9 errata-xmlrpc 2021-09-15 07:16:23 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 (RHOSP) 16.2 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/RHEA-2021:3483