]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph.py: fix timing of wait-for-* and osd markdown
authorSage Weil <sage@redhat.com>
Fri, 17 Feb 2017 22:17:18 +0000 (17:17 -0500)
committerSage Weil <sage@redhat.com>
Sun, 19 Feb 2017 02:12:23 +0000 (21:12 -0500)
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>
qa/tasks/ceph.py

index 1665f1a02472a6141defe4272cb07cea8a495eaa..05cd85a1b2b42eac19ef1b8636c925a6dcd2a1fb 100644 (file)
@@ -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