Description of problem: Install OCP with CRS as docker-registry back end storage, installation failed due to AnsibleUndefinedVariable error. According to code, seems "openshift.common.examples_content_version" not found. Version-Release number of the following components: openshift-ansible-3.6.169-1.git.0.440d532.el7 ansible-2.2.3.0-1.el7 How reproducible: 100% Steps to Reproduce: 1. install OCP with CRS # cat hosts [OSEv3:children] masters nodes glusterfs [OSEv3:vars] ... openshift_hosted_registry_storage_kind=glusterfs openshift_storage_glusterfs_is_native=false openshift_storage_glusterfs_heketi_is_native=false openshift_storage_glusterfs_heketi_url=glusterfs-1.example.com openshift_storage_glusterfs_heketi_admin_key=redhat [masters] master-1.example.com [nodes] master-1.example.com node-1.example.com [glusterfs] glusterfs-1.example.com glusterfs-2.example.com glusterfs-3.example.com 2. 3. Actual results: # ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml ... TASK [openshift_storage_glusterfs : Generate topology file] ******************** Tuesday 25 July 2017 02:54:08 +0000 (0:00:00.039) 0:08:59.614 ********** fatal: [master-1.example.com]: FAILED! => { "changed": false, "failed": true } MSG: AnsibleUndefinedVariable: 'dict object' has no attribute 'openshift' ... Expected results: Installation succeed. Additional info:
This block all CRS relate testing.
I just saw the problem. The entries in the [glusterfs] group each need 'glusterfs_devices' and 'glusterfs_ip' variables defined.
(In reply to Jose A. Rivera from comment #3) > I just saw the problem. The entries in the [glusterfs] group each need > 'glusterfs_devices' and 'glusterfs_ip' variables defined. Sorry for modify the inventory file, did this for protect hostname. in my true inventory file, it included the 'glusterfs_devices' variables.
(In reply to Jose A. Rivera from comment #3) > I just saw the problem. The entries in the [glusterfs] group each need > 'glusterfs_devices' and 'glusterfs_ip' variables defined. I checked the jinja2 file, it should use "hostvars[node].openshift.common.ip" when "glusterfs_ip" not defined, this could works very well when using CNS. # cat roles/openshift_storage_glusterfs/templates/v3.6/topology.json.j2 ... {%- if 'glusterfs_ip' in hostvars[node] -%} "{{ hostvars[node].glusterfs_ip }}" {%- else -%} "{{ hostvars[node].openshift.common.ip }}" {%- endif -%} ... By the way, according to document, it mentioned each node must have "glusterfs_hostname" and "glusterfs_devices" variables defined as minimum configure. # vim /usr/share/doc/openshift-ansible-docs-3.6.169/docs/example-inventories/hosts.byo.glusterfs.external.example ... # Specify the glusterfs group, which contains the nodes of the external # GlusterFS cluster. At a minimum, each node must have "glusterfs_hostname" # and "glusterfs_devices" variables defined. ... There is a PR which could fix this issue I believe, or just update the document to tell customer should defined 'glusterfs_ip'. https://github.com/openshift/openshift-ansible/pull/4885
https://github.com/openshift/openshift-ansible/pull/4891 should fix this
(In reply to Scott Dodson from comment #6) > https://github.com/openshift/openshift-ansible/pull/4891 should fix this Seems [1] better, please also merge [2] to avoid future issue. [1] https://github.com/openshift/openshift-ansible/pull/4891 [2] https://github.com/openshift/openshift-ansible/pull/4905
Verified with version openshift-ansible-3.6.172.0.0-1.git.0.d90ca2b.el7, it could pass "Generate topology file" task without AnsibleUndefinedVariable error.
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