Bug 1490268 - [3.7] "when statements should not include jinja2 templating delimiters" warning is shown when running installer with ansible-2.3.1.0-3.el7.noarch
Summary: [3.7] "when statements should not include jinja2 templating delimiters" warni...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.7.0
Assignee: Russell Teague
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-11 08:04 UTC by Johnny Liu
Modified: 2017-11-28 22:09 UTC (History)
3 users (show)

Fixed In Version: openshift-ansible-3.7.0-0.126.4
Doc Type: Bug Fix
Doc Text:
With Ansible 2.3 warnings are issued when using Jinja delimiters in 'when' conditions. The delimiters have been removed from the code base to avoid these warnings.
Clone Of:
Environment:
Last Closed: 2017-11-28 22:09:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Johnny Liu 2017-09-11 08:04:46 UTC
Description of problem:
When running 3.7 installer with ansible 2.3, some warning message is shown up, though it is harmless.


TASK [openshift_hosted : Ensure OpenShift router correctly rolls out (best-effort today)] ***
Monday 11 September 2017  06:53:14 +0000 (0:00:08.643)       0:14:36.796 ****** 
 [WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ not openshift_master_bootstrap_enabled |
default(True) }}

TASK [openshift_hosted : Determine the latest version of the OpenShift router deployment] ***
Monday 11 September 2017  06:53:14 +0000 (0:00:00.038)       0:14:36.835 ****** 
 [WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ not openshift_master_bootstrap_enabled |
default(True) }}

TASK [openshift_hosted : Poll for OpenShift router deployment success] *********
Monday 11 September 2017  06:53:14 +0000 (0:00:00.038)       0:14:36.874 ****** 
 [WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ not openshift_master_bootstrap_enabled |
default(True) }}

TASK [openshift_hosted : Ensure OpenShift registry correctly rolls out (best-effort today)] ***
Monday 11 September 2017  06:53:37 +0000 (0:00:01.855)       0:14:59.034 ****** 
 [WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ not openshift_master_bootstrap_enabled |
default(True) }}

TASK [openshift_hosted : Determine the latest version of the OpenShift registry deployment] ***
Monday 11 September 2017  06:53:37 +0000 (0:00:00.027)       0:14:59.062 ****** 
 [WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ not openshift_master_bootstrap_enabled |
default(True) }}

TASK [openshift_hosted : Sanity-check that the OpenShift registry rolled out correctly] ***
Monday 11 September 2017  06:53:37 +0000 (0:00:00.025)       0:14:59.088 ****** 
 [WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ not openshift_master_bootstrap_enabled |
default(True) }}



Version-Release number of the following components:
ansible-2.3.1.0-3.el7.noarch
openshift-ansible-3.7.0-0.125.0.git.0.91043b6.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:
Some warning message is shown after switch ansible version from 2.2 to 2.3

Expected results:
No more warning.

Additional info:

Comment 1 Russell Teague 2017-09-11 20:00:47 UTC
The error is being reported because a variable is being defined which contains Jinja2 templating delimiters.  Testing a workaround.

This particular use case is fixed[1] in Ansible v2.4.0.0-0.1.rc1

[1] https://github.com/ansible/ansible/commit/23324bdda015256f90737ae93351d0ce71da01b2

Comment 2 Russell Teague 2017-09-12 17:20:48 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/5379

Comment 3 Russell Teague 2017-09-13 17:57:50 UTC
Merged: https://github.com/openshift/openshift-ansible/pull/5379

Comment 4 Johnny Liu 2017-09-14 10:03:27 UTC
Re-test this bug with openshift-ansible-3.7.0-0.126.1.git.0.0bb5b0c.el7.noarch, but failed. Still reproduce the above warning. After checking the code, seem like the PR is not merged into rpm package.

Comment 5 Russell Teague 2017-09-15 13:15:03 UTC
$ git tag --contains a77f2ffdd0b1f37de2877a63511d8682ab4362bc
openshift-ansible-3.7.0-0.126.2
openshift-ansible-3.7.0-0.126.3


Waiting for build openshift-ansible-3.7.0-0.126.3

Comment 6 Johnny Liu 2017-09-18 07:23:53 UTC
Verified this bug with openshift-ansible-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch, and PASS.

No warning is seen now.

Comment 10 errata-xmlrpc 2017-11-28 22:09:56 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-2017:3188


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