From 72066b62ce340864e5cea74bda57caf246b7974c Mon Sep 17 00:00:00 2001 From: Ramesh Nachimuthu Date: Fri, 4 Apr 2014 18:30:56 +0530 Subject: fix the host discovery issue. Fixing the issue in discoverying host when there are more than two hosts in the cluster. Signed-off-by: Ramesh Nachimuthu Change-Id: I1d70f7e848b189f346a9cff4994f5bb478ce2a92 --- plugins/discoverpeers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/discoverpeers.py b/plugins/discoverpeers.py index b4d8a70..c7ff8fe 100755 --- a/plugins/discoverpeers.py +++ b/plugins/discoverpeers.py @@ -26,7 +26,6 @@ from glusternagios import utils def discoverhosts(): xmlElemList = [] nrpe_out_list = [] - resltdict = {} resultstring = "" command_peer_status = utils.sudoCmdPath.cmd + " " \ @@ -36,6 +35,7 @@ def discoverhosts(): xmlElemList = utils.parseXml(peer_status_out, "./peerStatus/peer") for peer in xmlElemList: if (peer.find('connected').text == "1"): + resltdict = {} resltdict['hostip'] = peer.find('hostname').text nrpe_out_list.append(resltdict) resultstring = json.dumps(nrpe_out_list) -- cgit