Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Cleanup cluster.py and also increase retry time for bios node check p…
Browse files Browse the repository at this point in the history
…ulse
  • Loading branch information
Andrianto Lie committed Apr 25, 2019
1 parent 9247373 commit 68a7c53
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ def connectGroup(group, producerNodes, bridgeNodes) :
if unstartedNodes > 0:
self.unstartedNodes=self.discoverUnstartedLocalNodes(unstartedNodes, totalNodes)

biosNode=self.discoverBiosNode()
if not biosNode or not biosNode.checkPulse():
biosNode=self.discoverBiosNode(timeout=Utils.systemWaitTimeout)
if not biosNode or not Utils.waitForBool(biosNode.checkPulse, Utils.systemWaitTimeout):
Utils.Print("ERROR: Bios node doesn't appear to be running...")
return False

Expand Down Expand Up @@ -1332,7 +1332,7 @@ def discoverLocalNodes(self, totalNodes, timeout=None):
psOutDisplay=psOut[:6660]+"..."
if Utils.Debug: Utils.Print("pgrep output: \"%s\"" % psOutDisplay)
for i in range(0, totalNodes):
instance=self.discoverLocalNode(i, psOut)
instance=self.discoverLocalNode(i, psOut, timeout)
if instance is None:
break
nodes.append(instance)
Expand All @@ -1341,12 +1341,12 @@ def discoverLocalNodes(self, totalNodes, timeout=None):
return nodes

# Populate a node matched to actual running instance
def discoverLocalNode(self, nodeNum, psOut=None):
def discoverLocalNode(self, nodeNum, psOut=None, timeout=None):
if psOut is None:
psOut=Cluster.pgrepEosServers(timeout)
if psOut is None:
Utils.Print("ERROR: No nodes discovered.")
return nodes
return None
pattern=Cluster.pgrepEosServerPattern(nodeNum)
m=re.search(pattern, psOut, re.MULTILINE)
if m is None:
Expand Down

0 comments on commit 68a7c53

Please sign in to comment.