]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #15717 from liewegas/wip-20326
authorSage Weil <sage@newdream.net>
Fri, 16 Jun 2017 21:12:20 +0000 (16:12 -0500)
committerGitHub <noreply@github.com>
Fri, 16 Jun 2017 21:12:20 +0000 (16:12 -0500)
qa/tasks/ceph.py: tolerate active+clean+something

Reviewed-by: Kefu Chai <kchai@redhat.com>
1  2 
qa/tasks/ceph.py

index 7f95bbca65c58bc1f5c0f213287a6c183d9a7e99,72a0cc2e9ab2d47f9ee735ef933ad92fc425ee83..62af20537c4e6da4fb2a46ac6b68b64f8c8dccc9
@@@ -1037,14 -1037,16 +1037,15 @@@ 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.")
 -        return
 +        raise RuntimeError("Scrubbing terminated -- not all pgs were active and clean.")
      check_time_now = time.localtime()
      time.sleep(1)
      all_roles = teuthology.all_roles(ctx.cluster)