Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1546293 - openshift-ansible playbook failed to deploy cluster due to templating error
openshift-ansible playbook failed to deploy cluster due to templating error
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.9.0
Unspecified Unspecified
high Severity high
: ---
: 3.9.0
Assigned To: Russell Teague
Peter Ruan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-16 14:48 EST by Peter Ruan
Modified: 2018-03-28 10:29 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Corrected the case of Jinja2 'none' object.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-28 10:29:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 None None None 2018-03-28 10:29 EDT

  None (edit)
Description Peter Ruan 2018-02-16 14:48:17 EST
Description of problem:
  openshift-ansible playbook failed to deploy cluster due to templating error


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

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


Description of problem:

Version-Release number of the following components:
rpm -q openshift-ansible
rpm -q ansible
ansible --version

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:

TASK [openshift_persistent_volumes : include_tasks] ****************************
Friday 16 February 2018  19:09:03 +0000 (0:00:00.324)       0:05:18.395 ******* 
included: /home/slave3/workspace/Launch Environment Flexy/private-openshift-ansible/roles/openshift_persistent_volumes/tasks/pvc.yml for host-8-246-82.host.centralci.eng.rdu2.redhat.com

TASK [openshift_persistent_volumes : Deploy PersistentVolumeClaim definitions] ***
Friday 16 February 2018  19:09:03 +0000 (0:00:00.035)       0:05:18.431 ******* 
fatal: [host-8-246-82.host.centralci.eng.rdu2.redhat.com]: FAILED! => {"changed": false, "msg": "AnsibleError: template error while templating string: no test named 'None'. String: ---\napiVersion: \"v1\"\nkind: \"List\"\nitems:\n{% for claim in persistent_volume_claims %}\n- apiVersion: \"v1\"\n  kind: \"PersistentVolumeClaim\"\n  metadata:\n    name: \"{{ claim.name }}\"\n  spec:\n    accessModes: {{ claim.access_modes | lib_utils_to_padded_yaml(2, 2) }}\n    resources:\n      requests:\n        storage: \"{{ claim.capacity }}\"\n{% if claim.storageclass is not None %}\n    storageClassName: \"{{ claim.storageclass }}\"\n{% endif %}\n{% endfor %}\n"}
	to retry, use: --limit @/home/slave3/workspace/Launch Environment Flexy/private-openshift-ansible/playbooks/deploy_cluster.retry

PLAY RECAP *********************************************************************
host-8-246-82.host.centralci.eng.rdu2.redhat.com : ok=479  changed=180  unreachable=0    failed=1   
localhost                  : ok=13   changed=0    unreachable=0    failed=0   


INSTALLER STATUS ***************************************************************
Initialization             : Complete (0:00:14)
Health Check               : Complete (0:00:19)
etcd Install               : Complete (0:00:37)
NFS Install                : Complete (0:00:13)
Master Install             : Complete (0:02:00)
Master Additional Install  : Complete (0:00:21)
Node Install               : Complete (0:01:31)
Hosted Install             : In Progress (0:00:02)
	This phase can be restarted by running: playbooks/openshift-hosted/config.yml
 


Play:     Create Hosted Resources - persistent volumes
     Task:     Deploy PersistentVolumeClaim definitions
     Message:  AnsibleError: template error while templating string: no test named 'None'. String: ---
               apiVersion: "v1"
               kind: "List"
               items:
               {% for claim in persistent_volume_claims %}
               - apiVersion: "v1"
                 kind: "PersistentVolumeClaim"
                 metadata:
                   name: "{{ claim.name }}"
                 spec:
                   accessModes: {{ claim.access_modes | lib_utils_to_padded_yaml(2, 2) }}
                   resources:
                     requests:
                       storage: "{{ claim.capacity }}"
               {% if claim.storageclass is not None %}
                   storageClassName: "{{ claim.storageclass }}"
               {% endif %}
               {% endfor %}

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag
Comment 1 Russell Teague 2018-02-16 16:22:32 EST
Related to recent changes in https://github.com/openshift/openshift-ansible/pull/7106
Comment 2 Russell Teague 2018-02-16 16:54:24 EST
Fixed in: https://github.com/openshift/openshift-ansible/pull/7182
Comment 3 Russell Teague 2018-02-20 08:21:23 EST
Merged.  Waiting for build with commit 5c393c4cc5b50b6223563f7f851fe4671b012575
Comment 4 Nicholas Nachefski 2018-02-20 11:38:39 EST
confirmed that 7182 does indeed fix this issue.


Initialization             : Complete (0:00:31)
Health Check               : Complete (0:00:04)
etcd Install               : Complete (0:00:41)
Load balancer Install      : Complete (0:00:10)
Master Install             : Complete (0:02:48)
Master Additional Install  : Complete (0:00:38)
Node Install               : Complete (0:03:52)
Hosted Install             : Complete (0:01:35)
Web Console Install        : Complete (0:00:34)
Metrics Install            : Complete (0:01:16)
Logging Install            : Complete (0:02:48)
Prometheus Install         : Complete (0:00:25)
Service Catalog Install    : Complete (0:01:29)

[root@master01 ~]# rpm -q atomic-openshift-master 
atomic-openshift-master-3.9.0-0.46.0.git.0.d03ead3.el7.x86_64
Comment 6 Peter Ruan 2018-02-26 02:36:53 EST
I can now able to spin up instances with .51
Comment 9 errata-xmlrpc 2018-03-28 10:29:21 EDT
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-2018:0489

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