From 445186b0a5822e2fa6391f3501216207174e8bde Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Thu, 16 Jun 2011 12:18:58 -0700 Subject: [PATCH] Refactor ceph healthy waiting into a separate subtask. Note, not a context manager, just a task. There's no cleanup. --- teuthology/task/ceph.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index b887e0aa6c..538a5d9411 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -505,6 +505,14 @@ def mds(ctx, config): run.wait(mds_daemons.itervalues()) +def healthy(ctx, config): + log.info('Waiting until ceph is healthy...') + (mon0_remote,) = ctx.cluster.only('mon.0').remotes.keys() + teuthology.wait_until_healthy( + remote=mon0_remote, + ) + + @contextlib.contextmanager def task(ctx, config): """ @@ -604,13 +612,7 @@ def task(ctx, config): coverage=config.get('coverage'), )), ): - - log.info('Waiting until ceph is healthy...') - (mon0_remote,) = ctx.cluster.only('mon.0').remotes.keys() - teuthology.wait_until_healthy( - remote=mon0_remote, - ) - + healthy(ctx=ctx, config=None) yield if ctx.archive is not None: -- 2.39.5