From 9c8c47da003174f98135740a598ff99e83a65aa9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 17 Feb 2017 17:17:18 -0500 Subject: [PATCH] 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) --- qa/tasks/ceph.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 -- 2.39.5