Bug 1509157
Summary: | Unable to list known health checks | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Wenkai Shi <weshi> | |
Component: | Installer | Assignee: | Luke Meyer <lmeyer> | |
Status: | CLOSED ERRATA | QA Contact: | Wenkai Shi <weshi> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 3.7.0 | CC: | aos-bugs, jokerman, mmccomas, sdodson | |
Target Milestone: | --- | |||
Target Release: | 3.7.z | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: |
Cause:
In order for the adhoc.yml playbook to list health checks, they are all loaded, and one failed to load in that environment.
Consequence:
Listing health checks failed with an error.
Fix:
The problem health check was adjusted.
Result:
Listing works again.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1538407 (view as bug list) | Environment: | ||
Last Closed: | 2018-04-05 09:30:40 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1538407 |
Description
Wenkai Shi
2017-11-03 08:29:50 UTC
Same result in ansible-2.4.0.0-5.el7 & ansible-2.3.2.0-2.el7 I ran into an issue like this recently while writing up the 'add container provider' playbooks for openshift-management. Specifically, in my playbook it was not picking up variables I had defined in my inventory, just like you have.
I looked quickly at the playbook you referenced, playbooks/byo/openshift-checks/adhoc.yml and confirmed you ran into the same 'issue' as me. That is to say, inventory variables are not being picked up.
This is caused by the definition of the 'hosts' in the adhoc checks playbook:
> - name: OpenShift health checks
> hosts: localhost
> connection: local
When `hosts` is 'localhost' I found that ansible does not consider the provided '-i hosts' inventory file.
I do not know if historically Ansible used to read the inventory file, but I know that the present behavior is to ignore the inventory. I'm tagging Russell to check this out, too.
The play runs against localhost, and the code aborts because openshift_deployment_type is not defined for localhost. Defining it (or just deployment_type) in the [OSEv3:vars] subsection does not define it for localhost. You can set it for localhost explicitly by adding at the top of the inventory file: localhost openshift_deployment_type=openshift-enterprise ...or by specifying it as an extra variable. Obviously, you shouldn't have to do that to get this to list checks. Unrelated changes to initialization code broke this path. Merged to master 3.7 backport https://github.com/openshift/openshift-ansible/pull/6772 Verified with version openshift-ansible-3.7.26-1.git.0.f87f1af.el7, known health checks can be list with command [1]. [1]. ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-checks/adhoc.yml ... Message: This playbook is meant to run health checks, but no checks were requested. Set the `openshift_checks` variable to a comma-separated list of check names or a YAML list. Available checks: curator diagnostics disk_availability docker_image_availability docker_storage elasticsearch etcd_imagedata_size etcd_traffic etcd_volume fluentd fluentd_config kibana logging logging_index_time memory_availability ovs_version package_availability package_update package_version Tags can be used as a shortcut to select multiple checks. Available tags and the checks they select: @etcd = etcd_imagedata_size,etcd_traffic,etcd_volume @health = curator,diagnostics,docker_storage,elasticsearch,etcd_traffic,etcd_volume,fluentd,fluentd_config,kibana,logging_index_time,ovs_version @logging = curator,elasticsearch,fluentd,kibana,logging_index_time @preflight = disk_availability,docker_image_availability,docker_storage,memory_availability,package_availability,package_update,package_version 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:0636 |