]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: do not wait for down/out osd for pg convergence
authorKefu Chai <kchai@redhat.com>
Wed, 8 Nov 2017 06:13:54 +0000 (14:13 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 8 Nov 2017 06:50:10 +0000 (14:50 +0800)
that osd is not invovlved in the PG state changes.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/ceph_manager.py

index 0d11bfe7c8a4c6f01b62f2c59ba282e016f8bde3..ed3b03d90e91f51e704ab457b63ef8bc6aeaad52 100644 (file)
@@ -2274,6 +2274,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,
@@ -2281,7 +2283,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: