mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
break out of the while loop after 15 minutes
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com> (cherry picked from commit bef6eb74dcaa37b70b1eab4d28bfa10abb0049d0) Signed-off-by: Zack Cerza <zack@cerza.org>
This commit is contained in:
parent
b4f524ebe4
commit
d88ec89a67
@ -66,7 +66,14 @@ def is_healthy(ctx, config):
|
||||
testdir = teuthology.get_testdir(ctx)
|
||||
ceph_admin = teuthology.get_first_mon(ctx, config)
|
||||
(remote,) = ctx.cluster.only(ceph_admin).remotes.keys()
|
||||
max_tries = 90 # 90 tries * 10 secs --> 15 minutes
|
||||
tries = 0
|
||||
while True:
|
||||
tries += 1
|
||||
if tries >= max_tries:
|
||||
msg = "ceph health was unable to get 'HEALTH_OK' after waiting 15 minutes"
|
||||
raise RuntimeError(msg)
|
||||
|
||||
r = remote.run(
|
||||
args=[
|
||||
'cd',
|
||||
@ -82,7 +89,7 @@ def is_healthy(ctx, config):
|
||||
log.debug('Ceph health: %s', out.rstrip('\n'))
|
||||
if out.split(None, 1)[0] == 'HEALTH_OK':
|
||||
break
|
||||
time.sleep(1)
|
||||
time.sleep(10)
|
||||
|
||||
def get_nodes_using_roles(ctx, config, role):
|
||||
"""Extract the names of nodes that match a given role from a cluster"""
|
||||
|
Loading…
Reference in New Issue
Block a user