Bug 1547229 - glusterfs installation failed on task "Ensure device mapper modules loaded"
Summary: glusterfs installation failed on task "Ensure device mapper modules loaded"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.9.0
Assignee: Jose A. Rivera
QA Contact: Hongkai Liu
URL:
Whiteboard:
: 1547843 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-20 19:22 UTC by Hongkai Liu
Modified: 2018-03-28 14:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-03-28 14:29:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:29:53 UTC

Description Hongkai Liu 2018-02-20 19:22:12 UTC
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 19:30:40 UTC
If use this commit, it works.
git reset --hard b90ec246f78ac66c4251996f9bb288875765ccaf

Comment 4 Scott Dodson 2018-02-20 20:22:02 UTC
openshift-ansible-3.9.0-0.46.0 has the fix

Comment 6 Hongkai Liu 2018-02-21 17:55:31 UTC
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 18:54:46 UTC
PR to fix this created: https://github.com/openshift/openshift-ansible/pull/7237

Comment 8 Hongkai Liu 2018-02-22 14:18:02 UTC
@Johnny,

I will verify this when the PR is merged.

Comment 9 Scott Dodson 2018-02-22 14:30:53 UTC
*** Bug 1547843 has been marked as a duplicate of this bug. ***

Comment 10 Wenkai Shi 2018-02-23 07:40:57 UTC
Move it to ASSIGNED since PR didn't merge.

Comment 11 Wenkai Shi 2018-02-23 07:41:40 UTC
It block CNS testing.

Comment 12 Wenkai Shi 2018-02-27 07:40:31 UTC
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 16:42:26 UTC
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 14:29:21 UTC
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.