summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSahina Bose <sabose@redhat.com>2015-10-28 17:07:19 +0530
committerSahina Bose <sabose@redhat.com>2015-11-05 21:31:56 -0800
commit92af01d26b460381835163113b3750573bd29824 (patch)
tree0de063f3369430ab47ec7ac5abed45e96b0d26c0
parent92ed869d5979ee6f1c83a39517805841f96d19fd (diff)
nagios: georep status fixing error when no sessions
Fixing error returned when geo-rep sessions are deleted Change-Id: If263ddf11dd486b32aae1e979f754b191ad082b6 Bug-Url:https://bugzilla.redhat.com/1261004 Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/12441 Reviewed-by: Ramesh N <rnachimu@redhat.com>
-rwxr-xr-xglusternagios/glustercli.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/glusternagios/glustercli.py b/glusternagios/glustercli.py
index fec1927..19469c1 100755
--- a/glusternagios/glustercli.py
+++ b/glusternagios/glustercli.py
@@ -524,6 +524,8 @@ def _parseVolumeGeoRepStatus(volumeName, tree):
replicaCount = 1
other_status = ['ACTIVE', 'INITIALIZING']
volume = tree.find('geoRep/volume')
+ if volume is None:
+ return {volumeName: {'slaves': slaves}}
for session in volume.findall('sessions/session'):
sessionKey = session.find('session_slave').text
slave = sessionKey.split("::")[-1]