From: Sage Weil Date: Fri, 17 Feb 2017 22:17:18 +0000 (-0500) Subject: qa/tasks/ceph.py: fix timing of wait-for-* and osd markdown X-Git-Tag: v10.2.11~85^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9c8c47da003174f98135740a598ff99e83a65aa9;p=ceph.git qa/tasks/ceph.py: fix timing of wait-for-* and osd markdown Mark down osds, *then* wait for them to come up or for the cluster to be healthy! Signed-off-by: Sage Weil (cherry picked from commit 86c0d07e32205e2b6aa417a0e4ae03f0084a1888) --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index efed134bc7db6..6fd856bc317ab 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1242,12 +1242,6 @@ def restart(ctx, config): ctx.daemons.get_daemon(type_, id_, cluster).restart() clusters.add(cluster) - if config.get('wait-for-healthy', True): - for cluster in clusters: - healthy(ctx=ctx, config=dict(cluster=cluster)) - if config.get('wait-for-osds-up', False): - for cluster in clusters: - wait_for_osds_up(ctx=ctx, config=dict(cluster=cluster)) manager = ctx.managers['ceph'] for dmon in daemons: if '.' in dmon: @@ -1255,6 +1249,13 @@ def restart(ctx, config): if dm_parts[1].isdigit(): if dm_parts[0] == 'osd': manager.mark_down_osd(int(dm_parts[1])) + + if config.get('wait-for-healthy', True): + for cluster in clusters: + healthy(ctx=ctx, config=dict(cluster=cluster)) + if config.get('wait-for-osds-up', False): + for cluster in clusters: + wait_for_osds_up(ctx=ctx, config=dict(cluster=cluster)) yield