diff options
author | Luke Meyer <lmeyer@redhat.com> | 2018-01-16 13:15:07 -0500 |
---|---|---|
committer | Luke Meyer <lmeyer@redhat.com> | 2018-01-16 13:15:07 -0500 |
commit | 2c85de5af492d6be8b46047d4a21fa6d450315ae (patch) | |
tree | 90df207ddf2d23ba043c751e1364c4a920274707 | |
parent | 8de2b99d915fadc6579320b7b74354ab33213067 (diff) | |
download | openshift-2c85de5af492d6be8b46047d4a21fa6d450315ae.tar.gz openshift-2c85de5af492d6be8b46047d4a21fa6d450315ae.tar.bz2 openshift-2c85de5af492d6be8b46047d4a21fa6d450315ae.tar.xz openshift-2c85de5af492d6be8b46047d4a21fa6d450315ae.zip |
openshift_checks: repair adhoc list-checks mode
fixes bug https://bugzilla.redhat.com/show_bug.cgi?id=1509157
docker_image_availability.__init__ was loading a variable that of course
was not defined for localhost, which is how this play runs. Fixed that.
Would be nice if there were a more generic way to solve that class of
problem but I can't think of anything for now that isn't worse.
Also noticed that this play gathers facts for localhost. That's not
necessary for what it's doing, so disabled that.
-rw-r--r-- | playbooks/openshift-checks/adhoc.yml | 1 | ||||
-rw-r--r-- | roles/openshift_health_checker/openshift_checks/docker_image_availability.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/playbooks/openshift-checks/adhoc.yml b/playbooks/openshift-checks/adhoc.yml index 414090733..249222ae4 100644 --- a/playbooks/openshift-checks/adhoc.yml +++ b/playbooks/openshift-checks/adhoc.yml @@ -11,6 +11,7 @@ # usage. Running this play only in localhost speeds up execution. hosts: localhost connection: local + gather_facts: false roles: - openshift_health_checker vars: diff --git a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py index 7afb8f730..ac6ffbbad 100644 --- a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py +++ b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py @@ -56,7 +56,7 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck): # ordered list of registries (according to inventory vars) that docker will try for unscoped images regs = self.ensure_list("openshift_docker_additional_registries") # currently one of these registries is added whether the user wants it or not. - deployment_type = self.get_var("openshift_deployment_type") + deployment_type = self.get_var("openshift_deployment_type", default="") if deployment_type == "origin" and "docker.io" not in regs: regs.append("docker.io") elif deployment_type == 'openshift-enterprise' and "registry.access.redhat.com" not in regs: |