]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph.py: fix timing of wait-for-* and osd markdown 20508/head
authorSage Weil <sage@redhat.com>
Fri, 17 Feb 2017 22:17:18 +0000 (17:17 -0500)
committerNathan Cutler <ncutler@suse.com>
Wed, 21 Feb 2018 13:03:18 +0000 (14:03 +0100)
Mark down osds, *then* wait for them to come up or for the cluster to be
healthy!

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 86c0d07e32205e2b6aa417a0e4ae03f0084a1888)

qa/tasks/ceph.py

index efed134bc7db649ec050408b0bdc943b1ff0e9b7..6fd856bc317ab1893cc6aaa4196911b5be298ee7 100644 (file)
@@ -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