From 86c0d07e32205e2b6aa417a0e4ae03f0084a1888 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 --- 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 1665f1a0247..05cd85a1b2b 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1301,12 +1301,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: @@ -1314,6 +1308,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