summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRamesh Nachimuthu <rnachimu@redhat.com>2014-04-04 18:30:56 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:14:33 +0530
commit72066b62ce340864e5cea74bda57caf246b7974c (patch)
treef376760f056ff68b2362e0d3c7992e4f4a490ff7 /plugins
parent13928ae0da5afb2d58fa2a268ebc61ee522ba3c4 (diff)
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 <rnachimu@redhat.com> Change-Id: I1d70f7e848b189f346a9cff4994f5bb478ce2a92
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/discoverpeers.py2
1 files changed, 1 insertions, 1 deletions
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)