]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph.py: tolerate active+clean+something 15717/head
authorSage Weil <sage@redhat.com>
Fri, 16 Jun 2017 02:29:15 +0000 (22:29 -0400)
committerSage Weil <sage@redhat.com>
Fri, 16 Jun 2017 02:29:28 +0000 (22:29 -0400)
where something is, say, snaptrim.  or maybe scrubbing.
or whatever.

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

index 181429b071629f4dab5645158addbb9f4fe90d1c..72a0cc2e9ab2d47f9ee735ef933ad92fc425ee83 100644 (file)
@@ -1037,11 +1037,12 @@ def osd_scrub_pgs(ctx, config):
     all_clean = False
     for _ in range(0, retries):
         stats = manager.get_pg_stats()
-        states = [stat['state'] for stat in stats]
-        if len(set(states)) == 1 and states[0] == 'active+clean':
+        bad = [stat['pgid'] for stat in stats if 'active+clean' not in stat['state']]
+        if not bad:
             all_clean = True
             break
-        log.info("Waiting for all osds to be active and clean.")
+        log.info(
+            "Waiting for all osds to be active and clean, waiting on %s" % bad)
         time.sleep(delays)
     if not all_clean:
         log.info("Scrubbing terminated -- not all pgs were active and clean.")