From: Sage Weil Date: Fri, 16 Jun 2017 02:29:15 +0000 (-0400) Subject: qa/tasks/ceph.py: tolerate active+clean+something X-Git-Tag: v12.1.0~92^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1565b86dc048e78f6939477a1094f8d6ce3dfce6;p=ceph.git qa/tasks/ceph.py: tolerate active+clean+something where something is, say, snaptrim. or maybe scrubbing. or whatever. Signed-off-by: Sage Weil --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 181429b07162..72a0cc2e9ab2 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -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.")