misc.wait_until_osds_up(): timeout after 5min
It doesn't make any sense to wait more than a few minutes for OSDs to
come up. If they take more than five minutes, fail the job.
@@ -910,7 +910,8 @@ def wait_until_osds_up(ctx, cluster, remote, ceph_cluster='ceph'):
"""Wait until all Ceph OSDs are booted."""
num_osds = num_instances_of_type(cluster, 'osd', ceph_cluster)
testdir = get_testdir(ctx)
- while True:
+ with safe_while(sleep=6, tries=50) as proceed:
+ while proceed():
r = remote.run(
args=[
'adjust-ulimits',
@@ -929,7 +930,6 @@ def wait_until_osds_up(ctx, cluster, remote, ceph_cluster='ceph'):
log.debug('%d of %d OSDs are up' % (up, num_osds))
if up == num_osds:
break
- time.sleep(1)
def reboot(node, timeout=300, interval=30):
