From eab0ae513700e7da50c16d568d473c342b5a2e73 Mon Sep 17 00:00:00 2001 From: Timothy Asir Jeyasingh Date: Tue, 28 Apr 2015 17:14:32 +0530 Subject: Enhance error message when glusterd not respond Enhance the message to suggest to user that issues may be with glusterd. Change the message "temporary error" into "Glusterd cannot be queried." Change-Id: I11ca09e03bebe87a083ac8e6a6d281f0172e2899 Signed-off-by: Timothy Asir Jeyasingh Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=1166602 Reviewed-on: http://review.gluster.org/10421 Reviewed-by: Ramesh N Reviewed-by: Shubhendu Tripathi Tested-by: Timothy Asir --- plugins/check_volume_status.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/check_volume_status.py b/plugins/check_volume_status.py index 8fab7ae..63494ea 100755 --- a/plugins/check_volume_status.py +++ b/plugins/check_volume_status.py @@ -42,7 +42,7 @@ def getVolumeStatus(args): message = "CRITICAL: Volume : %s type is stopped" % \ (volumes[args.volume]["volumeType"]) except glustercli.GlusterLockedException as e: - out = ("UNKNOWN: temporary error. %s" % '.'.join(e.err)) + out = ("UNKNOWN: Glusterd cannot be queried. %s" % '.'.join(e.err)) return utils.PluginStatusCode.UNKNOWN, out except glustercli.GlusterCmdFailedException as e: out = ("WARNING: Command execution failed. %s" % '.'.join(e.err)) @@ -55,7 +55,7 @@ def getVolumeQuotaStatus(args): try: qstatus = glustercli.volumeQuotaStatus(args.volume) except glustercli.GlusterLockedException as e: - out = ("UNKNOWN: temporary error. %s" % '.'.join(e.err)) + out = ("UNKNOWN: Glusterd cannot be queried. %s" % '.'.join(e.err)) return utils.PluginStatusCode.UNKNOWN, out except glustercli.GlusterCmdFailedException as e: out = ("QUOTA: Quota status could not be determined. %s" @@ -87,7 +87,7 @@ def getVolumeSelfHealSplitBrainStatus(args): try: volume = glustercli.volumeHealSplitBrainStatus(args.volume) except glustercli.GlusterLockedException as e: - out = ("UNKNOWN: temporary error. %s" % '.'.join(e.err)) + out = ("UNKNOWN: Glusterd cannot be queried. %s" % '.'.join(e.err)) return utils.PluginStatusCode.UNKNOWN, out except glustercli.GlusterCmdFailedException as e: out = ("Self heal status could not be determined. %s" @@ -118,7 +118,7 @@ def getVolumeGeoRepStatus(args): try: volume = glustercli.volumeGeoRepStatus(args.volume) except glustercli.GlusterLockedException as e: - out = ("UNKNOWN: temporary error. %s" % '.'.join(e.err)) + out = ("UNKNOWN: Glusterd cannot be queried. %s" % '.'.join(e.err)) return utils.PluginStatusCode.UNKNOWN, out except glustercli.GlusterCmdFailedException as e: out = ("Geo replication status could not be determined. %s" -- cgit