Bug 1537946 - Install CNS fail due to configured check not pass
Summary: Install CNS fail due to configured check not pass
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.9.0
Assignee: Russell Teague
QA Contact: Wenkai Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-24 07:07 UTC by Wenkai Shi
Modified: 2018-03-28 14:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Conditional check for openshift_hosted_registry_storage_glusterfs_ips expected an empty string, however, an empty list was presented. Updated the check to expect a list type.
Clone Of:
Environment:
Last Closed: 2018-03-28 14:22:32 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:22:52 UTC

Description Wenkai Shi 2018-01-24 07:07:17 UTC
Description of problem:
Install CNS as docker registry back end storage reference to [1], installation fail in TASK [openshift_sanitize_inventory : Ensure the hosted registry's GlusterFS storage is configured correctly].

[1]. https://github.com/openshift/openshift-ansible/blob/master/inventory/hosts.glusterfs.registry-only.example

Version-Release number of the following components:
openshift-ansible-3.9.0-0.22.0.git.0.0e9d896.el7
ansible-2.4.2.0-2.el7

How reproducible:
100%

Steps to Reproduce:
1. Install CNS 
# cat hosts
[OSEv3:children]
masters
nodes
glusterfs_registry

[OSEv3:vars]
...
openshift_hosted_registry_storage_kind=glusterfs
...

[masters]
master-1.example.com

[nodes]
master-1.example.com
node-1.example.com
glusterfs-1.example.com 
glusterfs-2.example.com 
glusterfs-3.example.com 

[glusterfs_registry]
glusterfs-1.example.com glusterfs_devices="['/dev/vsda']"
glusterfs-2.example.com glusterfs_devices="['/dev/vsda']"
glusterfs-3.example.com glusterfs_devices="['/dev/vsda']"
...

2.
3.

Actual results:
# ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml
...
TASK [openshift_sanitize_inventory : Ensure the hosted registry's GlusterFS storage is configured correctly] ***
Wednesday 24 January 2018  06:05:02 +0000 (0:00:00.113)       0:00:08.576 ***** 

fatal: [master-1.example.com]: FAILED! => {"changed": false, "msg": "Configuring a value for openshift_hosted_registry_storage_glusterfs_ips and with a glusterfs_registry host group is not allowed.\nSpecifying a glusterfs_registry host group indicates that a new GlusterFS cluster should be configured, whereas\nspecifying openshift_hosted_registry_storage_glusterfs_ips indicates wanting to use a pre-configured GlusterFS cluster for the registry storage."}
fatal: [glusterfs-1.example.com]: FAILED! => {"changed": false, "msg": "Configuring a value for openshift_hosted_registry_storage_glusterfs_ips and with a glusterfs_registry host group is not allowed.\nSpecifying a glusterfs_registry host group indicates that a new GlusterFS cluster should be configured, whereas\nspecifying openshift_hosted_registry_storage_glusterfs_ips indicates wanting to use a pre-configured GlusterFS cluster for the registry storage."}
fatal: [node-1.example.com]: FAILED! => {"changed": false, "msg": "Configuring a value for openshift_hosted_registry_storage_glusterfs_ips and with a glusterfs_registry host group is not allowed.\nSpecifying a glusterfs_registry host group indicates that a new GlusterFS cluster should be configured, whereas\nspecifying openshift_hosted_registry_storage_glusterfs_ips indicates wanting to use a pre-configured GlusterFS cluster for the registry storage."}
fatal: [glusterfs-2.example.com]: FAILED! => {"changed": false, "msg": "Configuring a value for openshift_hosted_registry_storage_glusterfs_ips and with a glusterfs_registry host group is not allowed.\nSpecifying a glusterfs_registry host group indicates that a new GlusterFS cluster should be configured, whereas\nspecifying openshift_hosted_registry_storage_glusterfs_ips indicates wanting to use a pre-configured GlusterFS cluster for the registry storage."}
fatal: [glusterfs-3.example.com]: FAILED! => {"changed": false, "msg": "Configuring a value for openshift_hosted_registry_storage_glusterfs_ips and with a glusterfs_registry host group is not allowed.\nSpecifying a glusterfs_registry host group indicates that a new GlusterFS cluster should be configured, whereas\nspecifying openshift_hosted_registry_storage_glusterfs_ips indicates wanting to use a pre-configured GlusterFS cluster for the registry storage."}

Expected results:
Should pass here

Additional info:
Add a TASK for debug:
# vim ./roles/openshift_sanitize_inventory/tasks/unsupported.yml
...
- name: QE Debug
  debug:
    msg: "openshift_hosted_registry_storage_kind = {{ openshift_hosted_registry_storage_kind }}  openshift_hosted_registry_storage_glusterfs_ips = {{ openshift_hosted_registry_storage_glusterfs_ips }}"
...

Get value:

TASK [openshift_sanitize_inventory : QE Debug] *********************************
Wednesday 24 January 2018  06:38:10 +0000 (0:00:00.070)       0:00:06.521 ***** 
ok: [master-1.example.com] => {
    "msg": "openshift_hosted_registry_storage_kind = glusterfs  openshift_hosted_registry_storage_glusterfs_ips = []"
}
ok: [node-1.example.com] => {
    "msg": "openshift_hosted_registry_storage_kind = glusterfs  openshift_hosted_registry_storage_glusterfs_ips = []"
}
ok: [glusterfs-1.example.com] => {
    "msg": "openshift_hosted_registry_storage_kind = glusterfs  openshift_hosted_registry_storage_glusterfs_ips = []"
}
ok: [glusterfs-2.example.com] => {
    "msg": "openshift_hosted_registry_storage_kind = glusterfs  openshift_hosted_registry_storage_glusterfs_ips = []"
}
ok: [glusterfs-3.example.com] => {
    "msg": "openshift_hosted_registry_storage_kind = glusterfs  openshift_hosted_registry_storage_glusterfs_ips = []"
}

Change '' to [] could fix the issue.

./roles/openshift_sanitize_inventory/tasks/unsupported.yml

-  - openshift_hosted_registry_storage_glusterfs_ips is defined and openshift_hosted_registry_storage_glusterfs_ips != ''
+  - openshift_hosted_registry_storage_glusterfs_ips is defined and openshift_hosted_registry_storage_glusterfs_ips != []

Comment 1 Wenkai Shi 2018-01-24 07:44:12 UTC
Block CNS as docker registry back end storage test.

Comment 3 Russell Teague 2018-01-24 18:18:07 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/6857

Comment 5 Wenkai Shi 2018-01-29 04:32:49 UTC
Verified with version openshift-ansible-3.9.0-0.31.0.git.0.e0a0ad8.el7, configure check passed.

Comment 8 errata-xmlrpc 2018-03-28 14:22:32 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.