From: Sage Weil Date: Fri, 6 Sep 2019 02:24:38 +0000 (-0500) Subject: qa/tasks/ceph: restart: stop osd, mark down, then start X-Git-Tag: v15.1.0~1631^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b078dd002fc1ad511daf3afbedd05caaf2b2e897;p=ceph-ci.git 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 --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index d6be968c7e3..d3e8880df8f 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))