qa/tasks/ceph2: use safe_while

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2019-11-21 10:48:27 -06:00
parent ad6bd514c8
commit 96e9b8bc29

View File

@ -405,7 +405,8 @@ def ceph_mons(ctx, config):
started=True,
)
while True:
with contextutil.safe_while(sleep=1, tries=180) as proceed:
while proceed():
log.info('Waiting for %d mons in monmap...' % (num_mons))
r = shell(
ctx=ctx,
@ -419,7 +420,6 @@ def ceph_mons(ctx, config):
j = json.loads(r.stdout.getvalue())
if len(j['mons']) == num_mons:
break
time.sleep(1)
# refresh ceph.conf files for all mons + first mgr
"""