except (run.CommandFailedError, AssertionError) as e:
log.info('ignoring mgr wait error, probably testing upgrade: %s', e)
- firstmon = teuthology.get_first_mon(ctx, config, cluster_name)
- (mon0_remote,) = ctx.cluster.only(firstmon).remotes.keys()
- teuthology.wait_until_osds_up(
- ctx,
- cluster=ctx.cluster,
- remote=mon0_remote,
- ceph_cluster=cluster_name,
- )
+ manager.wait_for_all_osds_up(timeout=300)
try:
manager.flush_all_pg_stats()
if config.get('wait-for-healthy', True):
log.info('Waiting until ceph cluster %s is healthy...', cluster_name)
- teuthology.wait_until_healthy(
- ctx,
- remote=mon0_remote,
- ceph_cluster=cluster_name,
- )
+ manager.wait_until_healthy(timeout=300)
if ctx.cluster.only(teuthology.is_type('mds', cluster_name)).remotes:
# Some MDSs exist, wait for them to be healthy
self.log('health:\n{h}'.format(h=out))
return json.loads(out)
+ def wait_until_healthy(self, timeout=None):
+ self.log("wait_until_healthy")
+ start = time.time()
+ while self.get_mon_health()['status'] != 'HEALTH_OK':
+ if timeout is not None:
+ assert time.time() - start < timeout, \
+ 'timeout expired in wait_until_healthy'
+ time.sleep(3)
+ self.log("wait_until_healthy done")
+
def get_filepath(self):
"""
Return path to osd data with {id} needing to be replaced