Description of problem: glusterfs installation failed on task "Ensure device mapper modules loaded" Version-Release number of the following components: rpm -q openshift-ansible $ git log --oneline -1 57674e53c (HEAD -> master, origin/master, origin/HEAD) Merge pull request #7188 from mtnbikenc/entry-include-check $ rpm -q ansible ansible-2.4.1.0-2.fc26.noarch $ ansible --version ansible 2.4.1.0 config file = /home/fedora/openshift-ansible/ansible.cfg configured module search path = [u'/home/fedora/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.13 (default, Sep 5 2017, 08:53:59) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)] How reproducible: Always Steps to Reproduce: 1. ansible-playbook -i inv.file openshift-ansible/playbooks/openshift-glusterfs/config.yml 2. 3. Actual results: TASK [openshift_storage_glusterfs : Ensure device mapper modules loaded] ***************************************************** task path: /home/fedora/openshift-ansible/roles/openshift_storage_glusterfs/tasks/kernel_modules.yml:2 fatal: [ec2-54-187-179-234.us-west-2.compute.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (#{{ ansible_managed }}\ndm_thin_pool\ndm_multipath\ntarget_core_user\n{% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %}\ndm_snapshot\ndm_mirror\n{% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable" } fatal: [ec2-52-37-115-29.us-west-2.compute.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (#{{ ansible_managed }}\ndm_thin_pool\ndm_multipath\ntarget_core_user\n{% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %}\ndm_snapshot\ndm_mirror\n{% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable" } fatal: [ec2-34-217-23-88.us-west-2.compute.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (#{{ ansible_managed }}\ndm_thin_pool\ndm_multipath\ntarget_core_user\n{% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %}\ndm_snapshot\ndm_mirror\n{% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable" } fatal: [ec2-34-212-250-17.us-west-2.compute.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (#{{ ansible_managed }}\ndm_thin_pool\ndm_multipath\ntarget_core_user\n{% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %}\ndm_snapshot\ndm_mirror\n{% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable" } fatal: [ec2-54-190-30-47.us-west-2.compute.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (#{{ ansible_managed }}\ndm_thin_pool\ndm_multipath\ntarget_core_user\n{% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %}\ndm_snapshot\ndm_mirror\n{% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable" } fatal: [ec2-34-209-85-0.us-west-2.compute.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (#{{ ansible_managed }}\ndm_thin_pool\ndm_multipath\ntarget_core_user\n{% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %}\ndm_snapshot\ndm_mirror\n{% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable" } fatal: [ec2-54-218-123-8.us-west-2.compute.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (#{{ ansible_managed }}\ndm_thin_pool\ndm_multipath\ntarget_core_user\n{% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %}\ndm_snapshot\ndm_mirror\n{% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable" } Expected results: Additional info: Please attach logs from ansible-playbook with the -vvv flag Will attach ansible.log and inv.file
If use this commit, it works. git reset --hard b90ec246f78ac66c4251996f9bb288875765ccaf
openshift-ansible-3.9.0-0.46.0 has the fix
Tested with $ git log --oneline -1 59d9c87e2 (HEAD -> master, tag: openshift-ansible-3.9.0-0.46.0) Automatic commit of package [openshift-ansible] release [3.9.0-0.46.0]. The problem is still there. But I got a workaround: I need to add a group in the inv. file (that is where undefined var occurred) to pass the failed task: glusterfs_registry Then add no hosts into the group since i do not use that at all. https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_storage_glusterfs/templates/glusterfs.conf.j2
PR to fix this created: https://github.com/openshift/openshift-ansible/pull/7237
@Johnny, I will verify this when the PR is merged.
*** Bug 1547843 has been marked as a duplicate of this bug. ***
Move it to ASSIGNED since PR didn't merge.
It block CNS testing.
Verified with version openshift-ansible-3.9.0-0.53.0.git.0.f8f01ef.el7, TASK [openshift_storage_glusterfs : Ensure device mapper modules loaded] could execute succeed.
Verified with # yum list installed | grep openshift atomic-openshift.x86_64 3.9.0-0.46.0.git.0.d03ead3.el7 $ cd openshift-ansible/ [fedora@ip-172-31-33-174 openshift-ansible]$ git log --oneline -1 2a9f35a3c (HEAD -> master, origin/master, origin/HEAD) Merge pull request #7314 from kwoodson/update_registry_certificates glusterfs is installed 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/RHBA-2018:0489