From b078dd002fc1ad511daf3afbedd05caaf2b2e897 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 5 Sep 2019 21:24:38 -0500 Subject: [PATCH] qa/tasks/ceph: restart: stop osd, mark down, then start If we stop, start, and then mark down, we may (likely) end up marking the *new* instance down, which is noisy (generates a cluster warning message) and inefficient. Signed-off-by: Sage Weil --- qa/tasks/ceph.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index d6be968c7e31..d3e8880df8f5 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1631,14 +1631,12 @@ def restart(ctx, config): with tweaked_option(ctx, config): for role in daemons: cluster, type_, id_ = teuthology.split_role(role) + ctx.daemons.get_daemon(type_, id_, cluster).stop() + if type_ == 'osd': + ctx.managers[cluster].mark_down_osd(id_) ctx.daemons.get_daemon(type_, id_, cluster).restart() clusters.add(cluster) - for role in daemons: - cluster, type_, id_ = teuthology.split_role(role) - if type_ == 'osd': - ctx.managers[cluster].mark_down_osd(id_) - if config.get('wait-for-healthy', True): for cluster in clusters: healthy(ctx=ctx, config=dict(cluster=cluster)) -- 2.47.3