From 1ced2460f3b3ee3e9af2101b8358be50f282a025 Mon Sep 17 00:00:00 2001 From: Sahina Bose Date: Mon, 19 May 2014 16:05:33 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/7798 Reviewed-by: Kanagaraj M --- plugins/check_volume_status.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/check_volume_status.py') 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 -- cgit