From 92af01d26b460381835163113b3750573bd29824 Mon Sep 17 00:00:00 2001 From: Sahina Bose Date: Wed, 28 Oct 2015 17:07:19 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/12441 Reviewed-by: Ramesh N --- glusternagios/glustercli.py | 2 ++ 1 file changed, 2 insertions(+) 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] -- cgit