diff options
author | Sahina Bose <sabose@redhat.com> | 2014-05-19 16:05:33 +0530 |
---|---|---|
committer | Sahina Bose <sabose@redhat.com> | 2014-05-20 02:18:07 -0700 |
commit | 1ced2460f3b3ee3e9af2101b8358be50f282a025 (patch) | |
tree | 69c91cb490b3d269b8d6febeb1d4d407ee8b8a1d /plugins/check_volume_status.py | |
parent | 272b5c54c3ab0f3c7117feec2bfdeb5d62cfdead (diff) |
plugins: Corrected quota status messages
Corrected the quota status message when hard limit
is reached.
Also removed the ";" at the end of the message.
Change-Id: If10e07a69d838439d1bfa73eca68b6dc13cf83a8
Bug-Url: https://bugzilla.redhat.com/1098046
Bug-Url: https://bugzilla.redhat.com/1098427
Signed-off-by: Sahina Bose <sabose@redhat.com>
Reviewed-on: http://review.gluster.org/7798
Reviewed-by: Kanagaraj M <kmayilsa@redhat.com>
Diffstat (limited to 'plugins/check_volume_status.py')
-rwxr-xr-x | plugins/check_volume_status.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/check_volume_status.py b/plugins/check_volume_status.py index bef8dbd..e2b9205 100755 --- a/plugins/check_volume_status.py +++ b/plugins/check_volume_status.py @@ -57,10 +57,12 @@ def getVolumeQuotaStatus(args): returnMsg = "QUOTA:" if qstatus.get("hard_ex_dirs"): hard_limit_ex = ', '.join(qstatus['hard_ex_dirs']) - returnMsg += ("hard limit exceeded on %s; " % hard_limit_ex) + returnMsg += ("hard limit reached on %s; " % hard_limit_ex) if qstatus.get('soft_ex_dirs'): soft_limit_ex = ', '.join(qstatus['soft_ex_dirs']) returnMsg += ("soft limit exceeded on %s" % soft_limit_ex) + if (returnMsg.endswith(';')): + returnMsg = returnMsg[:-1] if qstatus['status'] == glustercli.VolumeQuotaStatus.SOFT_LIMIT_EXCEEDED: return utils.PluginStatusCode.WARNING, returnMsg |