Bug 1758703

Summary: Upgrade failed due to missing review https://review.opendev.org/#/c/669964 in queens
Product: Red Hat OpenStack Reporter: shaju <shajuvk>
Component: openstack-tripleo-heat-templatesAssignee: mbollo
Status: CLOSED CURRENTRELEASE QA Contact: Ronnie Rasouli <rrasouli>
Severity: urgent Docs Contact:
Priority: high    
Version: 13.0 (Queens)CC: ccamacho, cfields, cfontain, ealcaniz, fbaudin, jfrancoa, lbezdick, mbollo, mburns, shdunne, slinaber
Target Milestone: z9Keywords: Regression, TestOnly, Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-8.4.1-5.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-15 11:50:25 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:

Description shaju 2019-10-04 22:33:06 UTC
Description of problem:

Upgrade of contrail products failing because of the bug introduced with the review  https://review.opendev.org/#/c/679152

The default behavior (in case if no variable provided ) was broken because the ansible expression lookup(‘vars’,…) always fails if no variable defined (and the latter part ‘|default([])’ is not applied).

This was reverted in the mater quite long time ago 
(https://review.opendev.org/#/c/669964) but not in the queens yet.


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

osp13

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:

upgrade should go seamlessly. Please make the changes in Queens branch too

Additional info:

Comment 1 shaju 2019-10-04 22:34:56 UTC
expected patch :
====== 
(undercloud) [stack@queensa common]$ diff -U 3 deploy-steps.j2.org deploy-steps.j2
--- deploy-steps.j2.org 2019-10-04 09:09:57.414000000 -0400
+++ deploy-steps.j2     2019-10-04 09:13:51.120000000 -0400
@@ -433,7 +433,7 @@
                 - include_tasks: deployments.yaml
                   vars:
                     force: false
-                  with_items: "{{ '{{' }} lookup('vars', tripleo_role_name + '_pre_deployments')|default([]) {{ '}}' }}"
+                  with_items: "{{ '{{' }} hostvars[inventory_hostname][tripleo_role_name ~ '_pre_deployments']|default([]) {{ '}}' }}"
               tags:
                 - overcloud
                 - pre_deploy_steps
@@ -521,7 +521,7 @@
                 - include_tasks: deployments.yaml
                   vars:
                     force: false
-                  with_items: "{{ '{{' }} lookup('vars', tripleo_role_name + '_post_deployments')|default([]) {{ '}}' }}"
+                  with_items: "{{ '{{' }} hostvars[inventory_hostname][tripleo_role_name ~ '_post_deployments']|default([]) {{ '}}' }}"
               tags:
                 - overcloud
                 - post_deploy_steps
 
 
--

Comment 4 mbollo 2019-10-29 16:15:51 UTC
Actually the patch is already merged in downstream branch also.

Comment 8 Lukas Bezdicka 2019-10-30 13:08:31 UTC
This was fixed in upstream queens by commit https://review.opendev.org/#/c/680728/3 which is present in the build.

Comment 10 Alex McLeod 2019-10-31 11:32:48 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 16 Lon Hohberger 2019-11-15 11:50:25 UTC
According to our records, this should be resolved by openstack-tripleo-heat-templates-8.4.1-13.el7ost.  This build is available now.