From: Sage Weil Date: Wed, 19 Dec 2018 13:14:30 +0000 (-0600) Subject: qa/tasks/ceph: wait for splits/merges before final scrub X-Git-Tag: v14.1.0~582^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6f06e394e487a3581fe4950dc1c8456c820a2b13;p=ceph-ci.git qa/tasks/ceph: wait for splits/merges before final scrub Signed-off-by: Sage Weil --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 56e15e623c6..fcc8dbb3103 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1116,12 +1116,15 @@ def osd_scrub_pgs(ctx, config): all_clean = False for _ in range(0, retries): stats = manager.get_pg_stats() - bad = [stat['pgid'] for stat in stats if 'active+clean' not in stat['state']] - if not bad: + unclean = [stat['pgid'] for stat in stats if 'active+clean' not in stat['state']] + split_merge = [] + osd_dump = manager.get_osd_dump_json() + split_merge = [i['pool_name'] for i in osd_dump['pools'] if i['pg_num'] != i['pg_num_target']] + if not unclean and not split_merge: all_clean = True break log.info( - "Waiting for all PGs to be active and clean, waiting on %s" % bad) + "Waiting for all PGs to be active+clean and split+merged, waiting on %s to go clean and/or %s to split/merge" % (unclean, split_merge)) time.sleep(delays) if not all_clean: raise RuntimeError("Scrubbing terminated -- not all pgs were active and clean.")