]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/ceph: restart: stop osd, mark down, then start
authorSage Weil <sage@redhat.com>
Fri, 6 Sep 2019 02:24:38 +0000 (21:24 -0500)
committerSage Weil <sage@redhat.com>
Fri, 6 Sep 2019 02:25:27 +0000 (21:25 -0500)
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 <sage@redhat.com>
qa/tasks/ceph.py

index d6be968c7e31bf2088e5b77dd3c97481d13494a1..d3e8880df8f5b994c5f096644b03e26fd9d2dd67 100644 (file)
@@ -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))