Bug 1546293
| Summary: | openshift-ansible playbook failed to deploy cluster due to templating error | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Peter Ruan <pruan> |
| Component: | Installer | Assignee: | Russell Teague <rteague> |
| Status: | CLOSED ERRATA | QA Contact: | Peter Ruan <pruan> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 3.9.0 | CC: | aos-bugs, jokerman, mmccomas, nick, pprakash, rteague, wmeng |
| Target Milestone: | --- | ||
| Target Release: | 3.9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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 14:29:21 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: | |||
Related to recent changes in https://github.com/openshift/openshift-ansible/pull/7106 Merged. Waiting for build with commit 5c393c4cc5b50b6223563f7f851fe4671b012575 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 I can now able to spin up instances with .51 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 |
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