Merge "Handle missing node during hold check"

This commit is contained in:
Zuul 2018-10-22 13:08:10 +00:00 committed by Gerrit Code Review
commit 2befc3a4a8
1 changed files with 6 additions and 1 deletions

View File

@ -283,7 +283,12 @@ class ZooKeeper(object):
count = 0
for nodeid in nodes:
node_path = '%s/%s' % (self.NODE_ROOT, nodeid)
node_data, node_stat = self.client.get(node_path)
try:
node_data, node_stat = self.client.get(node_path)
except kze.NoNodeError:
# Node got removed on us. Just ignore.
continue
if not node_data:
self.log.warning("Node ID %s has no data", nodeid)
continue