From 13948635feb101ea64d1e19e9af89e96badb34e6 Mon Sep 17 00:00:00 2001 From: Sahina Bose Date: Thu, 29 May 2014 12:45:57 +0530 Subject: nagios-common: geo-rep-corrected the comparison check for faulty Geo rep faulty status would be if any 1 node is faulty in distributed type Also corrected the doc text Change-Id: Ie926e8c44ddff986d616369f1fcab7d0f3956f01 Bug-Url: https://bugzilla.redhat.com/1101218 Signed-off-by: Sahina Bose Reviewed-on: http://review.gluster.org/7922 Reviewed-by: Kanagaraj M --- glusternagios/glustercli.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glusternagios/glustercli.py b/glusternagios/glustercli.py index 4029905..7aa0bd4 100755 --- a/glusternagios/glustercli.py +++ b/glusternagios/glustercli.py @@ -548,7 +548,7 @@ def _parseVolumeGeoRepStatus(volumeName, out): # subvolume. So if fault+passive > than num of primary bricks, # moving to faulty if (count_dict['faulty'] + count_dict['passive'] - > count_dict['nodecount']/replicaCount): + >= count_dict['nodecount']/replicaCount): slaves[slave]['status'] = GeoRepStatus.FAULTY else: slaves[slave]['status'] = GeoRepStatus.PARTIAL_FAULTY @@ -569,9 +569,9 @@ def volumeGeoRepStatus(volumeName, remoteServer=None): {VOLUMENAME: {'slaves': [{SLAVENAME:{ 'nodecount': COUNT, 'faulty': COUNT, - 'notstarted': 0, - 'stopped': 0, - 'passive':0, + 'notstarted': COUNT, + 'stopped': COUNT, + 'passive':COUNT, 'detail': detailed message, 'status': GEOREPSTATUS}} ]} -- cgit