summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/openshift_checks/logging/fluentd.py
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-08-02 06:16:32 -0400
committerGitHub <noreply@github.com>2017-08-02 06:16:32 -0400
commitb22ebdcce1c5ffea48cf95695d654d112da5c812 (patch)
tree3122d150cc46d2b28e3c9908b04bf2c714822412 /roles/openshift_health_checker/openshift_checks/logging/fluentd.py
parentbeb5deaedb105acd113807597858069a38553952 (diff)
parent04154a21237f9da6ee64bf57097d125b85b99a5f (diff)
downloadopenshift-b22ebdcce1c5ffea48cf95695d654d112da5c812.tar.gz
openshift-b22ebdcce1c5ffea48cf95695d654d112da5c812.tar.bz2
openshift-b22ebdcce1c5ffea48cf95695d654d112da5c812.tar.xz
openshift-b22ebdcce1c5ffea48cf95695d654d112da5c812.zip
Merge pull request #4592 from juanvallejo/jvallejo/verify-fluentd-logging-config
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_health_checker/openshift_checks/logging/fluentd.py')
-rw-r--r--roles/openshift_health_checker/openshift_checks/logging/fluentd.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/logging/fluentd.py b/roles/openshift_health_checker/openshift_checks/logging/fluentd.py
index 063e707a9..b3485bf44 100644
--- a/roles/openshift_health_checker/openshift_checks/logging/fluentd.py
+++ b/roles/openshift_health_checker/openshift_checks/logging/fluentd.py
@@ -11,8 +11,6 @@ class Fluentd(LoggingCheck):
name = "fluentd"
tags = ["health", "logging"]
- logging_namespace = None
-
def run(self):
"""Check various things and gather errors. Returns: result as hash"""
@@ -27,7 +25,6 @@ class Fluentd(LoggingCheck):
if check_error:
msg = ("The following Fluentd deployment issue was found:"
- "\n-------\n"
"{}".format(check_error))
return {"failed": True, "changed": False, "msg": msg}
@@ -147,7 +144,11 @@ class Fluentd(LoggingCheck):
def get_nodes_by_name(self):
"""Retrieve all the node definitions. Returns: dict(name: node), error string"""
- nodes_json = self._exec_oc("get nodes -o json", [])
+ nodes_json = self.exec_oc(
+ self.logging_namespace,
+ "get nodes -o json",
+ []
+ )
try:
nodes = json.loads(nodes_json)
except ValueError: # no valid json - should not happen
@@ -158,10 +159,3 @@ class Fluentd(LoggingCheck):
node['metadata']['name']: node
for node in nodes['items']
}, None
-
- def _exec_oc(self, cmd_str, extra_args):
- return super(Fluentd, self).exec_oc(
- self.logging_namespace,
- cmd_str,
- extra_args,
- )