From 5f51278dee925c47055aacbb8ffac5e351ea7ee2 Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Mon, 10 Jul 2017 16:58:31 -0400 Subject: openshift_checks: fix execute_module params Fix where execute_module was being passed task_vars in place of tmp param. Most modules don't seem to use either and so this doesn't fail; but under some conditions (perhaps different per version of ansible?) it tried to treat the dict as a string and came back with a python stack trace. --- roles/openshift_health_checker/openshift_checks/logging/kibana.py | 2 +- roles/openshift_health_checker/openshift_checks/logging/logging.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/openshift_health_checker/openshift_checks') diff --git a/roles/openshift_health_checker/openshift_checks/logging/kibana.py b/roles/openshift_health_checker/openshift_checks/logging/kibana.py index 442f407b1..551e8dfa0 100644 --- a/roles/openshift_health_checker/openshift_checks/logging/kibana.py +++ b/roles/openshift_health_checker/openshift_checks/logging/kibana.py @@ -62,7 +62,7 @@ class Kibana(LoggingCheck): # TODO(lmeyer): give users option to validate certs status_code=302, ) - result = self.execute_module('uri', args, task_vars) + result = self.execute_module('uri', args, None, task_vars) if result.get('failed'): return result['msg'] return None diff --git a/roles/openshift_health_checker/openshift_checks/logging/logging.py b/roles/openshift_health_checker/openshift_checks/logging/logging.py index 05b4d300c..e8821f0ba 100644 --- a/roles/openshift_health_checker/openshift_checks/logging/logging.py +++ b/roles/openshift_health_checker/openshift_checks/logging/logging.py @@ -78,7 +78,7 @@ class LoggingCheck(OpenShiftCheck): "extra_args": list(extra_args) if extra_args else [], } - result = execute_module("ocutil", args, task_vars) + result = execute_module("ocutil", args, None, task_vars) if result.get("failed"): msg = ( 'Unexpected error using `oc` to validate the logging stack components.\n' -- cgit v1.2.3 From e1c3499ad16f332d7684fb2eb896f980740c95b7 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Mon, 10 Jul 2017 17:45:17 +0200 Subject: Add overlay to supported Docker storage drivers Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1467809 As a next step, we can refine under which conditions the overlay driver is supported. --- roles/openshift_health_checker/openshift_checks/docker_storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/openshift_health_checker/openshift_checks') diff --git a/roles/openshift_health_checker/openshift_checks/docker_storage.py b/roles/openshift_health_checker/openshift_checks/docker_storage.py index 8d0fbcc9c..e80691ef3 100644 --- a/roles/openshift_health_checker/openshift_checks/docker_storage.py +++ b/roles/openshift_health_checker/openshift_checks/docker_storage.py @@ -17,7 +17,7 @@ class DockerStorage(DockerHostMixin, OpenShiftCheck): tags = ["pre-install", "health", "preflight"] dependencies = ["python-docker-py"] - storage_drivers = ["devicemapper", "overlay2"] + storage_drivers = ["devicemapper", "overlay", "overlay2"] max_thinpool_data_usage_percent = 90.0 max_thinpool_meta_usage_percent = 90.0 -- cgit v1.2.3 From 1c213b51468fa698acb08d18ce5d6b2a5796d93d Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Mon, 10 Jul 2017 15:38:22 -0400 Subject: add scheduled pods check --- roles/openshift_health_checker/openshift_checks/logging/logging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/openshift_health_checker/openshift_checks') diff --git a/roles/openshift_health_checker/openshift_checks/logging/logging.py b/roles/openshift_health_checker/openshift_checks/logging/logging.py index e8821f0ba..6e951e82c 100644 --- a/roles/openshift_health_checker/openshift_checks/logging/logging.py +++ b/roles/openshift_health_checker/openshift_checks/logging/logging.py @@ -54,12 +54,12 @@ class LoggingCheck(OpenShiftCheck): """Returns: list of pods not in a ready and running state""" return [ pod for pod in pods - if any( + if not pod.get("status", {}).get("containerStatuses") or any( container['ready'] is False for container in pod['status']['containerStatuses'] ) or not any( condition['type'] == 'Ready' and condition['status'] == 'True' - for condition in pod['status']['conditions'] + for condition in pod['status'].get('conditions', []) ) ] -- cgit v1.2.3