mirror of
https://github.com/ceph/ceph
synced 2024-12-29 23:12:27 +00:00
Merge pull request #982 from ceph/wip-13507
Changes for wip-13507 and test fixes Reviewed-by: Kefu Chai <kchai@redhat.com> Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
commit
51093a3384
@ -1279,6 +1279,7 @@ class CephManager:
|
||||
self.raw_cluster_cmd('osd', 'pool', 'create',
|
||||
pool_name, str(pg_num))
|
||||
self.pools[pool_name] = pg_num
|
||||
time.sleep(1)
|
||||
|
||||
def add_pool_snap(self, pool_name, snap_name):
|
||||
"""
|
||||
|
@ -298,6 +298,9 @@ def task(ctx, config):
|
||||
|
||||
ctx.manager.wait_for_all_up()
|
||||
|
||||
ctx.manager.raw_cluster_cmd('osd', 'set', 'noscrub')
|
||||
ctx.manager.raw_cluster_cmd('osd', 'set', 'nodeep-scrub')
|
||||
|
||||
repair_test_1(ctx, mdataerr, choose_primary, "scrub")
|
||||
repair_test_1(ctx, mdataerr, choose_replica, "scrub")
|
||||
repair_test_1(ctx, dataerr, choose_primary, "deep-scrub")
|
||||
|
@ -236,9 +236,8 @@ class InconsistentObjChecker:
|
||||
log.info('shard = %r' % shard)
|
||||
log.info('attr = %s' % attr_name)
|
||||
assert 'osd' in shard
|
||||
assert attr_name in shard
|
||||
osd = shard['osd']
|
||||
attr = shard[attr_name]
|
||||
attr = shard.get(attr_name, False)
|
||||
if osd == self.osd:
|
||||
assert bad_attr is None, \
|
||||
"multiple entries found for the given OSD"
|
||||
@ -249,9 +248,9 @@ class InconsistentObjChecker:
|
||||
"multiple good attrs found"
|
||||
good_attr = attr
|
||||
assert bad_attr is not None, \
|
||||
"good {attr} not found".format(attr=attr_name)
|
||||
assert good_attr is not None, \
|
||||
"bad {attr} not found".format(attr=attr_name)
|
||||
assert good_attr is not None, \
|
||||
"good {attr} not found".format(attr=attr_name)
|
||||
assert good_attr != bad_attr, \
|
||||
"bad attr is identical to the good ones: " \
|
||||
"{0} == {1}".format(good_attr, bad_attr)
|
||||
@ -302,10 +301,10 @@ def test_list_inconsistent_obj(ctx, manager, osd_remote, pg, acting, osd_id,
|
||||
with contextlib.closing(StringIO()) as out:
|
||||
mon.run(args=cmd.split(), stdout=out)
|
||||
objs = json.loads(out.getvalue())
|
||||
assert len(objs) == 1
|
||||
assert len(objs['inconsistents']) == 1
|
||||
|
||||
checker = InconsistentObjChecker(osd_id, acting, obj_name)
|
||||
inc_obj = objs[0]
|
||||
inc_obj = objs['inconsistents'][0]
|
||||
log.info('inc = %r', inc_obj)
|
||||
checker.basic_checks(inc_obj)
|
||||
for check in checks:
|
||||
|
Loading…
Reference in New Issue
Block a user