]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/thrashosds: wait before wait_for_recovery 15310/head
authorSage Weil <sage@redhat.com>
Wed, 31 May 2017 18:19:33 +0000 (14:19 -0400)
committerSage Weil <sage@redhat.com>
Thu, 15 Jun 2017 16:14:24 +0000 (12:14 -0400)
Make sure OSDs are up *and* they have flushed their PG stats before
waiting for recovery to ensure that we do not see a stale 'clean' state.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph_manager.py
qa/tasks/thrashosds.py

index 99d6221637d9954eef22fabf1c3ff97cb0cd4758..d976795ec453a9668200b9656a335cdd65d501c7 100644 (file)
@@ -1186,6 +1186,9 @@ class CephManager:
                                 'osd.{osd}: {got} < {need}'.
                                 format(osd=osd, got=got, need=need))
 
+    def flush_all_pg_stats(self):
+        self.flush_pg_stats(range(len(self.get_osd_dump())))
+
     def do_rados(self, remote, cmd, check_status=True):
         """
         Execute a remote rados command.
index 29fefbc067511ed5880cba8655b66ac6081d762f..2cd98145e05a4039e59b5114b179e30e51ef801a 100644 (file)
@@ -197,4 +197,6 @@ def task(ctx, config):
     finally:
         log.info('joining thrashosds')
         thrash_proc.do_join()
+        cluster_manager.wait_for_all_up()
+        cluster_manager.flush_all_pg_stats()
         cluster_manager.wait_for_recovery(config.get('timeout', 360))