diff options
author | juanvallejo <jvallejo@redhat.com> | 2017-05-12 17:30:33 -0400 |
---|---|---|
committer | juanvallejo <jvallejo@redhat.com> | 2017-05-12 17:30:33 -0400 |
commit | 54405b344a060627ed87277ce2920ecca851196c (patch) | |
tree | 1aff186ea05b479ceb76f4a6d4cb48e99909fb9f /roles | |
parent | c46a19ad719efae03362b75865cdf8dbd747b4cb (diff) | |
parent | 92c1ef8d62fe4daf96319408f763f1bf33c7916a (diff) | |
download | openshift-54405b344a060627ed87277ce2920ecca851196c.tar.gz openshift-54405b344a060627ed87277ce2920ecca851196c.tar.bz2 openshift-54405b344a060627ed87277ce2920ecca851196c.tar.xz openshift-54405b344a060627ed87277ce2920ecca851196c.zip |
Merge branch 'jvallejo/add-etcd-volume-check' of github.com:juanvallejo/openshift-ansible into jvallejo/add-etcd-volume-check
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_health_checker/openshift_checks/etcd_volume.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/etcd_volume.py b/roles/openshift_health_checker/openshift_checks/etcd_volume.py index b742f7603..6db81cbef 100644 --- a/roles/openshift_health_checker/openshift_checks/etcd_volume.py +++ b/roles/openshift_health_checker/openshift_checks/etcd_volume.py @@ -1,3 +1,5 @@ +"""A health check for OpenShift clusters.""" + from openshift_checks import OpenShiftCheck, OpenShiftCheckException, get_var @@ -7,9 +9,9 @@ class EtcdVolume(OpenShiftCheck): name = "etcd_volume" tags = ["etcd", "health"] - # pylint: disable=invalid-name - default_etcd_device_usage_threshold_percent = 90 - # where to find ectd data, higher priority first. + # Default device usage threshold. Value should be in the range [0, 100]. + default_threshold_percent = 90 + # Where to find ectd data, higher priority first. supported_mount_paths = ["/var/lib/etcd", "/var/lib", "/var", "/"] @classmethod @@ -27,8 +29,8 @@ class EtcdVolume(OpenShiftCheck): threshold = get_var( task_vars, - "etcd_device_usage_threshold_percent", - default=self.default_etcd_device_usage_threshold_percent + "r_openshift_health_checker_etcd_device_usage_threshold_percent", + default=self.default_threshold_percent ) used_percent = 100.0 * used / total |