From: Sage Weil Date: Wed, 31 May 2017 18:19:33 +0000 (-0400) Subject: qa/tasks/thrashosds: wait before wait_for_recovery X-Git-Tag: v12.1.0~107^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15310%2Fhead;p=ceph.git qa/tasks/thrashosds: wait before wait_for_recovery 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 --- diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 99d6221637d9..d976795ec453 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -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. diff --git a/qa/tasks/thrashosds.py b/qa/tasks/thrashosds.py index 29fefbc06751..2cd98145e05a 100644 --- a/qa/tasks/thrashosds.py +++ b/qa/tasks/thrashosds.py @@ -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))