summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/openshift_checks/logging
diff options
context:
space:
mode:
authorLuke Meyer <lmeyer@redhat.com>2017-07-20 22:25:47 -0400
committerLuke Meyer <lmeyer@redhat.com>2017-08-02 14:06:37 -0400
commitbf0828bc0f2e3088df20abc77e30a162595e1c22 (patch)
treea46617defefce2cf180666ad441451f54d418704 /roles/openshift_health_checker/openshift_checks/logging
parentf6e0126c3cda6622fc2371b3b603108b94ed9d39 (diff)
downloadopenshift-bf0828bc0f2e3088df20abc77e30a162595e1c22.tar.gz
openshift-bf0828bc0f2e3088df20abc77e30a162595e1c22.tar.bz2
openshift-bf0828bc0f2e3088df20abc77e30a162595e1c22.tar.xz
openshift-bf0828bc0f2e3088df20abc77e30a162595e1c22.zip
openshift_checks: add property to track 'changed'
Introduced the 'changed' property for checks that can make changes to track whether they did or not. Rather than the check's own logic having to track this and include it in the result hash, just set the property and have the action plugin insert it in the result hash after running (even if there is an exception). Cleared out a lot of crufty "changed: false" hash entries.
Diffstat (limited to 'roles/openshift_health_checker/openshift_checks/logging')
-rw-r--r--roles/openshift_health_checker/openshift_checks/logging/curator.py6
-rw-r--r--roles/openshift_health_checker/openshift_checks/logging/elasticsearch.py6
-rw-r--r--roles/openshift_health_checker/openshift_checks/logging/fluentd.py6
-rw-r--r--roles/openshift_health_checker/openshift_checks/logging/kibana.py6
4 files changed, 12 insertions, 12 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/logging/curator.py b/roles/openshift_health_checker/openshift_checks/logging/curator.py
index 32d853d57..32a92c909 100644
--- a/roles/openshift_health_checker/openshift_checks/logging/curator.py
+++ b/roles/openshift_health_checker/openshift_checks/logging/curator.py
@@ -18,16 +18,16 @@ class Curator(LoggingCheck):
"curator",
)
if error:
- return {"failed": True, "changed": False, "msg": error}
+ return {"failed": True, "msg": error}
check_error = self.check_curator(curator_pods)
if check_error:
msg = ("The following Curator deployment issue was found:"
"{}".format(check_error))
- return {"failed": True, "changed": False, "msg": msg}
+ return {"failed": True, "msg": msg}
# TODO(lmeyer): run it all again for the ops cluster
- return {"failed": False, "changed": False, "msg": 'No problems found with Curator deployment.'}
+ return {"failed": False, "msg": 'No problems found with Curator deployment.'}
def check_curator(self, pods):
"""Check to see if curator is up and working. Returns: error string"""
diff --git a/roles/openshift_health_checker/openshift_checks/logging/elasticsearch.py b/roles/openshift_health_checker/openshift_checks/logging/elasticsearch.py
index 8bdda1f32..b2e9a8f49 100644
--- a/roles/openshift_health_checker/openshift_checks/logging/elasticsearch.py
+++ b/roles/openshift_health_checker/openshift_checks/logging/elasticsearch.py
@@ -21,16 +21,16 @@ class Elasticsearch(LoggingCheck):
"es",
)
if error:
- return {"failed": True, "changed": False, "msg": error}
+ return {"failed": True, "msg": error}
check_error = self.check_elasticsearch(es_pods)
if check_error:
msg = ("The following Elasticsearch deployment issue was found:"
"{}".format(check_error))
- return {"failed": True, "changed": False, "msg": msg}
+ return {"failed": True, "msg": msg}
# TODO(lmeyer): run it all again for the ops cluster
- return {"failed": False, "changed": False, "msg": 'No problems found with Elasticsearch deployment.'}
+ return {"failed": False, "msg": 'No problems found with Elasticsearch deployment.'}
def _not_running_elasticsearch_pods(self, es_pods):
"""Returns: list of pods that are not running, list of errors about non-running pods"""
diff --git a/roles/openshift_health_checker/openshift_checks/logging/fluentd.py b/roles/openshift_health_checker/openshift_checks/logging/fluentd.py
index b3485bf44..69c7b4392 100644
--- a/roles/openshift_health_checker/openshift_checks/logging/fluentd.py
+++ b/roles/openshift_health_checker/openshift_checks/logging/fluentd.py
@@ -20,16 +20,16 @@ class Fluentd(LoggingCheck):
"fluentd",
)
if error:
- return {"failed": True, "changed": False, "msg": error}
+ return {"failed": True, "msg": error}
check_error = self.check_fluentd(fluentd_pods)
if check_error:
msg = ("The following Fluentd deployment issue was found:"
"{}".format(check_error))
- return {"failed": True, "changed": False, "msg": msg}
+ return {"failed": True, "msg": msg}
# TODO(lmeyer): run it all again for the ops cluster
- return {"failed": False, "changed": False, "msg": 'No problems found with Fluentd deployment.'}
+ return {"failed": False, "msg": 'No problems found with Fluentd deployment.'}
@staticmethod
def _filter_fluentd_labeled_nodes(nodes_by_name, node_selector):
diff --git a/roles/openshift_health_checker/openshift_checks/logging/kibana.py b/roles/openshift_health_checker/openshift_checks/logging/kibana.py
index efb14ab42..c600bb47e 100644
--- a/roles/openshift_health_checker/openshift_checks/logging/kibana.py
+++ b/roles/openshift_health_checker/openshift_checks/logging/kibana.py
@@ -30,7 +30,7 @@ class Kibana(LoggingCheck):
"kibana",
)
if error:
- return {"failed": True, "changed": False, "msg": error}
+ return {"failed": True, "msg": error}
check_error = self.check_kibana(kibana_pods)
if not check_error:
@@ -39,10 +39,10 @@ class Kibana(LoggingCheck):
if check_error:
msg = ("The following Kibana deployment issue was found:"
"{}".format(check_error))
- return {"failed": True, "changed": False, "msg": msg}
+ return {"failed": True, "msg": msg}
# TODO(lmeyer): run it all again for the ops cluster
- return {"failed": False, "changed": False, "msg": 'No problems found with Kibana deployment.'}
+ return {"failed": False, "msg": 'No problems found with Kibana deployment.'}
def _verify_url_internal(self, url):
"""