From f870cc5f289ae03bd88e8d6c52a393f9ba9621f2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 31 May 2017 14:19:33 -0400 Subject: [PATCH] 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 --- qa/tasks/ceph_manager.py | 3 +++ qa/tasks/thrashosds.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 99d6221637d99..d976795ec453a 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 29fefbc067511..2cd98145e05a4 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)) -- 2.39.5