Wait up to 30s to lock a node

Otherwise, we might wait indefinitely if something has gone
wrong with zookeeper.

Change-Id: I1f00beef34c72b3ebff7605fcc0e12ea3f3105dd
This commit is contained in:
James E. Blair 2017-09-28 11:18:43 -07:00
parent e2f0a87ad8
commit ac1155d2b1
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ class Nodepool(object):
try:
for node in nodes:
self.log.debug("Locking node %s" % (node,))
self.sched.zk.lockNode(node)
self.sched.zk.lockNode(node, timeout=30)
locked_nodes.append(node)
except Exception:
self.log.exception("Error locking nodes:")