Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1547229 - glusterfs installation failed on task "Ensure device mapper modules loaded"
glusterfs installation failed on task "Ensure device mapper modules loaded"
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.9.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.9.0
Assigned To: Jose A. Rivera
Hongkai Liu
:
: 1547843 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-20 14:22 EST by Hongkai Liu
Modified: 2018-03-28 10:29 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
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 Hongkai Liu 2018-02-20 14:22:12 EST
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
Comment 3 Hongkai Liu 2018-02-20 14:30:40 EST
If use this commit, it works.
git reset --hard b90ec246f78ac66c4251996f9bb288875765ccaf
Comment 4 Scott Dodson 2018-02-20 15:22:02 EST
openshift-ansible-3.9.0-0.46.0 has the fix
Comment 6 Hongkai Liu 2018-02-21 12:55:31 EST
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
Comment 7 Jose A. Rivera 2018-02-21 13:54:46 EST
PR to fix this created: https://github.com/openshift/openshift-ansible/pull/7237
Comment 8 Hongkai Liu 2018-02-22 09:18:02 EST
@Johnny,

I will verify this when the PR is merged.
Comment 9 Scott Dodson 2018-02-22 09:30:53 EST
*** Bug 1547843 has been marked as a duplicate of this bug. ***
Comment 10 Wenkai Shi 2018-02-23 02:40:57 EST
Move it to ASSIGNED since PR didn't merge.
Comment 11 Wenkai Shi 2018-02-23 02:41:40 EST
It block CNS testing.
Comment 12 Wenkai Shi 2018-02-27 02:40:31 EST
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.
Comment 13 Hongkai Liu 2018-02-28 11:42:26 EST
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.
Comment 16 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.