From d19b7403595bef1c3ba73f4a5fb83f5ef2dd3f81 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 8 Nov 2017 14:13:54 +0800 Subject: [PATCH] qa: do not wait for down/out osd for pg convergence that osd is not invovlved in the PG state changes. Signed-off-by: Kefu Chai (cherry picked from commit 7f549af459b40c5bb51a24a3a443ed7a7116915e) --- qa/tasks/ceph_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index be1e7be41406..004a8f495f83 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -2323,6 +2323,8 @@ class CephManager: def wait_till_pg_convergence(self, timeout=None): start = time.time() old_stats = None + active_osds = [osd['osd'] for osd in self.get_osd_dump() + if osd['in'] and osd['up']] while True: # strictly speaking, no need to wait for mon. but due to the # "ms inject socket failures" setting, the osdmap could be delayed, @@ -2330,7 +2332,7 @@ class CephManager: # newly created pools which is not yet known by mgr. so, to make sure # the mgr is updated with the latest pg-stats, waiting for mon/mgr is # necessary. - self.flush_all_pg_stats() + self.flush_pg_stats(active_osds) new_stats = dict((stat['pgid'], stat['state']) for stat in self.get_pg_stats()) if old_stats == new_stats: -- 2.47.3