Bug 1462143

Summary: Install CNS failed with error variable is undefined
Product: OpenShift Container Platform Reporter: Wenkai Shi <weshi>
Component: InstallerAssignee: Jose A. Rivera <jarrpa>
Status: CLOSED ERRATA QA Contact: Wenkai Shi <weshi>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.6.0CC: aos-bugs, jokerman, mmccomas, sdodson
Target Milestone: ---   
Target Release: 3.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Fix error when groups.glusterfs_registry is undefined.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-14 21:01:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wenkai Shi 2017-06-16 10:08:14 UTC
Description of problem:
Install CNS failed with error variable is undefined

Version-Release number of selected component (if applicable):
openshift-ansible-3.6.112-1.git.0.1ce58b5.el7

How reproducible:
100%

Steps to Reproduce:
1. Install OCP with CNS
# cat hosts
...
openshift_hosted_registry_storage_kind=glusterfs
...
[nodes]
...
glusterfs1.example.com
glusterfs2.example.com
glusterfs3.example.com
[glusterfs]
glusterfs1.example.com glusterfs_devices="['/dev/sdb']"
glusterfs2.example.com glusterfs_devices="['/dev/sdb']"
glusterfs3.example.com glusterfs_devices="['/dev/sdb']"
...
2.
3.

Actual results:
# ansible-playbook -i host -v /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml
...
TASK [openshift_storage_glusterfs : set_fact] **********************************
Friday 16 June 2017  08:37:30 +0000 (0:00:00.853)       0:15:32.891 *********** 
fatal: [master.example.com]: FAILED! => {
    "failed": true
}

MSG:

the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'dict object' has no attribute 'glusterfs_registry'

The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- set_fact:
  ^ here
...

Expected results:
Installation succeed

Additional info:

Comment 1 Jose A. Rivera 2017-06-16 16:23:19 UTC
ACK. Fix on the way.

Comment 2 Jose A. Rivera 2017-06-17 00:59:32 UTC
This should be resolved once https://github.com/openshift/openshift-ansible/pull/4484 merges.

Comment 3 Jose A. Rivera 2017-06-19 17:55:44 UTC
PR has merged. Moving to ON_QA.

Comment 4 Wenkai Shi 2017-06-21 05:43:02 UTC
Verified with version openshift-ansible-3.6.121-1.git.0.ed0b72c.el7, installation succeed, CNS as registry backend storage works well.

Comment 7 errata-xmlrpc 2017-12-14 21:01:55 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-2017:3438