summaryrefslogtreecommitdiffstats
path: root/glusternagios/glustercli.py
diff options
context:
space:
mode:
authorSahina Bose <sabose@redhat.com>2014-04-16 16:26:10 +0530
committerBala.FA <barumuga@redhat.com>2014-04-28 16:20:46 +0530
commitd8a700fae2a92e8f447e9fa64844028a7cfc56e9 (patch)
treea1c561e41b6e6647eff762ddb11361af8bc42258 /glusternagios/glustercli.py
parent5628129026c62699025f3ba13b16f442b267aa0f (diff)
glustercli: Changed return code when quota not enabled
When quota is not enabled the gluster cli command fails and was giving the wrong status. Fixed this. Change-Id: Ibf9709f7ccd17565473d5a258b323123f6904b82 Signed-off-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'glusternagios/glustercli.py')
-rwxr-xr-xglusternagios/glustercli.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/glusternagios/glustercli.py b/glusternagios/glustercli.py
index 03ea806..5753811 100755
--- a/glusternagios/glustercli.py
+++ b/glusternagios/glustercli.py
@@ -459,6 +459,9 @@ def volumeQuotaStatus(volumeName, remoteServer=None):
rc, out, err = _execGluster(command)
if rc == 0:
return _parseVolumeQuotaStatus(out)
+ else:
+ if len(err) > 0 and err[0].find("Quota is disabled") > -1:
+ return VolumeQuotaStatus.DISABLED
raise GlusterCmdFailedException(rc, err)