diff --git a/tasks/ceph_manager.py b/tasks/ceph_manager.py index 1917e3ba645..a76f5769ae2 100644 --- a/tasks/ceph_manager.py +++ b/tasks/ceph_manager.py @@ -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): """ diff --git a/tasks/repair_test.py b/tasks/repair_test.py index 8b51dd47f89..be4a7f7e594 100644 --- a/tasks/repair_test.py +++ b/tasks/repair_test.py @@ -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") diff --git a/tasks/scrub_test.py b/tasks/scrub_test.py index a2ab2c46c69..e8f706490d2 100644 --- a/tasks/scrub_test.py +++ b/tasks/scrub_test.py @@ -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: