Description of problem: Install OCP with native glusterfs. During installation, ALL tasks of glusterfs were skipped due to "Conditional check failed". Added some tasks to debug, found out that the variable "g_glusterfs_registry_hosts" is not defined. Version-Release number of selected component (if applicable): atomic-openshift-utils-3.6.68-1.git.0.9cbe2b7.el7 How reproducible: 100% Steps to Reproduce: 1.Install OCP with native glusterfs setting # cat hosts ... openshift_hosted_registry_storage_kind=glusterfs ... [glusterfs] gulsterfs1.example.com glusterfs_devices="['/dev/vsda']" glusterfs2.example.com glusterfs_devices="['/dev/vsda']" glusterfs3.example.com glusterfs_devices="['/dev/vsda']" ... # ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml 2. 3. Actual results: # ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml ... TASK [openshift_storage_glusterfs : ... skipping: [master.example.com] => { "changed": false, "skip_reason": "Conditional check failed", "skipped": true } ... TASK [openshift_hosted : Wait for registry pods] ******************************* ... fatal: [master.example.com]: FAILED! => { "attempts": 60, "changed": false, "failed": true, "results": { "cmd": "/usr/bin/oc get pod --selector=docker-registry=default -o json -n default", "results": [ { "apiVersion": "v1", "items": [], "kind": "List", "metadata": {}, "resourceVersion": "", "selfLink": "" } ], "returncode": 0 }, "state": "list" } ... Installation failed in [openshift_hosted : Wait for registry pods] task because the native glusterfs is not deployed. Expected results: Installation succeed Additional info: Add some tasks to check the variable. # cat /usr/share/ansible/openshift-ansible/roles/openshift_storage_glusterfs/tasks/main.yml --- - name: Create temp directory for doing work in command: mktemp -d /tmp/openshift-glusterfs-ansible-XXXXXX register: mktemp changed_when: False check_mode: no - name: QE Debug g_glusterfs_hosts debug: var=g_glusterfs_hosts - include: glusterfs_config.yml when: - g_glusterfs_hosts | default([]) | count > 0 - name: QE Debug openshift.hosted.registry.storage debug: var=openshift.hosted.registry.storage.kind - name: QE Debug openshift.hosted.registry.glusterfs.swap debug: var=openshift.hosted.registry.glusterfs.swap - name: QE Debug g_glusterfs_registry_hosts debug: var=g_glusterfs_registry_hosts - include: glusterfs_registry.yml when: - g_glusterfs_registry_hosts | default([]) | count > 0 - "openshift.hosted.registry.storage.kind == 'glusterfs' or openshift.hosted.registry.glusterfs.swap" - name: Delete temp directory file: name: "{{ mktemp.stdout }}" state: absent changed_when: False check_mode: no # ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml ... TASK [openshift_storage_glusterfs : QE Debug g_glusterfs_hosts] **************** Tuesday 16 May 2017 06:18:59 +0000 (0:00:00.324) 0:45:58.665 *********** ok: [master.example.com] => { "g_glusterfs_hosts": "VARIABLE IS NOT DEFINED!" } ... TASK [openshift_storage_glusterfs : QE Debug openshift.hosted.registry.storage] Tuesday 16 May 2017 06:19:05 +0000 (0:00:00.112) 0:46:04.621 *********** ok: [master.example.com] => { "openshift.hosted.registry.storage.kind": "glusterfs" } TASK [openshift_storage_glusterfs : QE Debug openshift.hosted.registry.glusterfs.swap] *** Tuesday 16 May 2017 06:19:06 +0000 (0:00:00.125) 0:46:04.746 *********** ok: [master.example.com] => { "openshift.hosted.registry.glusterfs.swap": "VARIABLE IS NOT DEFINED!" } TASK [openshift_storage_glusterfs : QE Debug g_glusterfs_registry_hosts] ******* Tuesday 16 May 2017 06:19:06 +0000 (0:00:00.121) 0:46:04.868 *********** ok: [master.example.com] => { "g_glusterfs_registry_hosts": "VARIABLE IS NOT DEFINED!" } ...
This bug is block all CNS relate testing.
Should be resolved by https://github.com/openshift/openshift-ansible/pull/4245
Verified with version openshift-ansible-3.6.121-1.git.0.ed0b72c.el7, installation succeed, CNS as registry backend storage works well.
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/RHEA-2017:1716