From 85bb52d586297233728d331e37ef238e902bfeac Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Fri, 21 Jul 2017 14:53:33 +0200 Subject: Make LoggingCheck.run return the correct type The run method is expected to return a dict. Even though we should not run LoggingCheck by itself, it is still possible to do it and without this change we get an unhandled exception. --- roles/openshift_health_checker/openshift_checks/logging/logging.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'roles/openshift_health_checker') diff --git a/roles/openshift_health_checker/openshift_checks/logging/logging.py b/roles/openshift_health_checker/openshift_checks/logging/logging.py index a48e1c728..43ba6c406 100644 --- a/roles/openshift_health_checker/openshift_checks/logging/logging.py +++ b/roles/openshift_health_checker/openshift_checks/logging/logging.py @@ -11,6 +11,9 @@ from openshift_checks import OpenShiftCheck, OpenShiftCheckException class LoggingCheck(OpenShiftCheck): """Base class for OpenShift aggregated logging component checks""" + # FIXME: this should not be listed as a check, since it is not meant to be + # run by itself. + name = "logging" logging_namespace = "logging" @@ -27,7 +30,7 @@ class LoggingCheck(OpenShiftCheck): return masters[0] == hostname def run(self): - pass + return {} def get_pods_for_component(self, namespace, logging_component): """Get all pods for a given component. Returns: list of pods for component, error string""" -- cgit v1.2.3