From: Josh Durgin Date: Wed, 5 Oct 2011 00:19:56 +0000 (-0700) Subject: Retry listing machines if the lock server goes down. X-Git-Tag: 1.1.0~2768 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=107db6a913e58201ed51b097881979539723a139;p=teuthology.git Retry listing machines if the lock server goes down. --- diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index baf93a4079..a448fa96ea 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -53,7 +53,13 @@ def lock_machines(ctx, config): while True: # make sure there are enough machines up machines = lock.list_locks(ctx) - assert machines is not None, 'error listing machines' + if machines is None: + if ctx.block: + log.warn('error listing machines, trying again') + time.sleep(20) + continue + else: + assert 0, 'error listing machines' num_up = len(filter(lambda machine: machine['up'], machines)) assert num_up >= config, 'not enough machines are up'