tasks/scrub_test.py: Make test deterministic by updating digests

ceph_test_rados: Get coverage of digest updates in deep-scrub/repair

Signed-off-by: David Zafman <dzafman@redhat.com>
This commit is contained in:
David Zafman 2016-10-19 17:10:29 -07:00
parent 5fe8522df4
commit e000ab2f46
3 changed files with 18 additions and 0 deletions

View File

@ -14,6 +14,9 @@ overrides:
- 'attr name mistmatch'
- 'deep-scrub 1 missing, 0 inconsistent objects'
- 'failed to pick suitable auth object'
conf:
osd:
osd deep scrub update digest min age: 0
tasks:
- install:
- ceph:

View File

@ -1,3 +1,7 @@
override:
conf:
osd:
osd deep scrub update digest min age: 0
tasks:
- rados:
clients: [client.0]

View File

@ -293,6 +293,10 @@ def test_list_inconsistent_obj(ctx, manager, osd_remote, pg, acting, osd_id,
omap_val = 'val'
manager.do_rados(mon, ['-p', pool, 'setomapval', obj_name,
omap_key, omap_val])
# Update missing digests, requires "osd deep scrub update digest min age: 0"
pgnum = get_pgnum(pg)
manager.do_pg_scrub(pool, pgnum, 'deep-scrub')
messup = MessUp(manager, osd_remote, pool, osd_id, obj_name, obj_path,
omap_key, omap_val)
for test in [messup.rm_omap, messup.add_omap, messup.change_omap,
@ -344,6 +348,9 @@ def task(ctx, config):
- attr name mistmatch
- deep-scrub 1 missing, 0 inconsistent objects
- failed to pick suitable auth object
conf:
osd:
osd deep scrub update digest min age: 0
- scrub_test:
"""
if config is None:
@ -387,6 +394,10 @@ def task(ctx, config):
manager.do_rados(mon, ['-p', 'rbd', 'setomapheader', obj_name, 'hdr'])
log.info('err is %d' % p.exitstatus)
# Update missing digests, requires "osd deep scrub update digest min age: 0"
pgnum = get_pgnum(pg)
manager.do_pg_scrub('rbd', pgnum, 'deep-scrub')
log.info('messing with PG %s on osd %d' % (pg, osd))
test_repair_corrupted_obj(ctx, manager, pg, osd_remote, obj_path, 'rbd')
test_repair_bad_omap(ctx, manager, pg, osd, obj_name)