Bug 1547955

Summary: Undercloud / Overcloud Heat stack fails on: YAQL list index out of range (includes upgrades cases)
Product: Red Hat OpenStack Reporter: Sergii Golovatiuk <sgolovat>
Component: openstack-tripleo-heat-templatesAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: medium Docs Contact:
Priority: high    
Version: 12.0 (Pike)CC: aschultz, dbecker, dpeacock, lhh, mburns, morazi, rhel-osp-director-maint, sclewis, sgolovat, yprokule
Target Milestone: z2Keywords: Triaged, ZStream
Target Release: 12.0 (Pike)   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-7.0.9-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1547949
: 1547956 (view as bug list) Environment:
Last Closed: 2018-03-28 17:17:34 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: 1547949    
Bug Blocks: 1547956, 1547957    

Description Sergii Golovatiuk 2018-02-22 11:20:42 UTC
+++ This bug was initially created as a clone of Bug #1547949 +++

The latest YAQL (1.1.3-2.el7) introduces backward incompatible change which was not present in YAQL (1.1.0-3.el7) and below. In order to be able to upgrade to latest YAQL and not to break any new deployments or upgrades YAQL expression should be rewritten to version which is compatible in all YAQL versions. 

Upstream bug: https://bugs.launchpad.net/tripleo/+bug/1750032
Upstream fix: https://review.openstack.org/#/c/545856/1

Comment 12 Sergii Golovatiuk 2018-03-13 15:41:01 UTC
puddle will have yaql-1.1.0 that's correct. The problem is that RHOSP 13 comes with yaql 1.1.3 which acts differently. During undercloud upgrade yaql will be upgraded from 1.1.0 to 1.1.3. In this case, yaql expression will fail to equate. So, this patch refactor yaql equation to format which works exactly in yaql 1.1.0 and 1.1.3. In this case upgrade won't fail as expression will be evaluated identically in 1.1.0 and 1.1.3.

Comment 13 Gurenko Alex 2018-03-13 16:43:18 UTC
In this case puddle 2018-03-10.1 comes with patches with following package:

[stack@undercloud-0 ~]$ rpm -q openstack-tripleo-heat-templates
openstack-tripleo-heat-templates-7.0.9-6.el7ost.noarch

[stack@undercloud-0 ~]$ sed -n '516p' /usr/share/openstack-tripleo-heat-templates/overcloud.j2.yaml
          expression: dict($.data.where($ != null).flatten().selectMany($.items()).groupBy($[0], $[1]).select([$[0], $[1].flatten()]))

other changes from the commit are also there, so we're good to go.

Comment 16 errata-xmlrpc 2018-03-28 17:17:34 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/RHSA-2018:0602