Bug 1596321
| Summary: | hostvars[node].openshift.common.ip undefined for CNS backed registry | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Stuart Auchterlonie <sauchter> |
| Component: | Installer | Assignee: | Jose A. Rivera <jarrpa> |
| Status: | CLOSED ERRATA | QA Contact: | Wenkai Shi <weshi> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.9.0 | CC: | aos-bugs, aos-storage-staff, jarrpa, jokerman, mmccomas, sauchter, weshi |
| Target Milestone: | --- | ||
| Target Release: | 3.10.z | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: |
undefined
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-09-13 15:58:31 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: | |||
Hi, could you please provide more details: 1. Inventory file 2. Error log of ansible-playbook command with "-vvv" parameter. 3. Version of the build(openshift-ansible) 4. Detail reproduce steps(such as the order of playbook to execute) PR is merged. QE's cluster doesn't have such issue. Verified with version openshift-ansible-3.10.45-1.git.0.5aef941.el7.noarch, code has been merged. Installation is good. 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:2695 |
Description of problem: When running the ansible playbook to setup the registry the following error is encountered. TASK [openshift_hosted : set openshift_hosted facts] **************************************************************************************************************** fatal: [l12886.example.com]: FAILED! => {} MSG: The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'openshift' The error appears to have been in '/home/user/tst/openshift-ansible/roles/openshift_hosted/tasks/registry.yml': line 39, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: set openshift_hosted facts ^ here exception type: <class 'ansible.errors.AnsibleUndefinedVariable'> exception: 'dict object' has no attribute 'openshift' to retry, use: --limit @/home/user/.ansible-retry/deploy_registry.retry Version-Release number of selected component (if applicable): CNS 3.10 pre release How reproducible: Steps to Reproduce: 1. Attempt to deploy registry with CNS configured for arbiter support 2. 3. Actual results: as above Expected results: installation succeeds Additional info: Workarounds were applied to get the installation to succeed. 1. Add glusterfs_ip to each of the nodes in the inventory 2. Take out the default `hostvars[node].openshift.common.ip` This allows the installation to succeed. ======== - openshift_hosted_registry_storage_glusterfs_ips: "{%- set gluster_ips = [] %}{% if groups.glusterfs_registry is defined %}{% for node in groups.glusterfs_registry %}{%- set _ = gluster_ips.append(hostvars[node].glusterfs_ip | default(hostvars[node].openshift.common.ip)) %}{% endfor %}{{ gluster_ips }}{% elif groups.glusterfs is defined %}{% for node in groups.glusterfs %}{%- set _ = gluster_ips.append(hostvars[node].glusterfs_ip | default(hostvars[node].openshift.common.ip)) %}{% endfor %}{{ gluster_ips }}{% else %}{{ openshift_hosted_registry_storage_glusterfs_ips }}{% endif %}" + openshift_hosted_registry_storage_glusterfs_ips: "{%- set gluster_ips = [] %}{% if groups.glusterfs_registry is defined %}{% for node in groups.glusterfs_registry %}{%- set _ = gluster_ips.append(hostvars[node].glusterfs_ip | default(hostvars[node].openshift.common.ip)) %}{% endfor %}{{ gluster_ips }}{% elif groups.glusterfs is defined %}{% for node in groups.glusterfs %}{%- set _ = gluster_ips.append(hostvars[node].glusterfs_ip | default('')) %}{% endfor %}{{ gluster_ips }}{% else %}{{ openshift_hosted_registry_storage_glusterfs_ips }}{% endif %}" ========