summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xplugins/check_volume_status.py4
-rw-r--r--tests/test_check_volume_status.py2
2 files changed, 4 insertions, 2 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
diff --git a/tests/test_check_volume_status.py b/tests/test_check_volume_status.py
index f916174..c1ffa32 100644
--- a/tests/test_check_volume_status.py
+++ b/tests/test_check_volume_status.py
@@ -61,7 +61,7 @@ class TestCheckVolumeStatus(TestCaseBase):
exitStatusCode, exitStatusMsg = (check_volume_status
.getVolumeQuotaStatus(args))
assert exitStatusCode == utils.PluginStatusCode.CRITICAL
- self.assertEqual("QUOTA:hard limit exceeded on dir1, dir2; "
+ self.assertEqual("QUOTA:hard limit reached on dir1, dir2; "
"soft limit exceeded on dir3", exitStatusMsg)
mock_volumeQuotaStatus.return_value = _getQuotaStatusOk()
exitStatusCode, exitStatusMsg = (check_volume_status