From 8da6e97bd4e208952322d15b733b7880a4af330c Mon Sep 17 00:00:00 2001 From: David Zafman Date: Fri, 29 Apr 2016 14:16:59 -0700 Subject: [PATCH 1/4] CephManager: Wait 1 second for pool creation to get far enough along Fixes: http://tracker.ceph.com/issues/15673 Signed-off-by: David Zafman --- tasks/ceph_manager.py | 1 + 1 file changed, 1 insertion(+) 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): """ From 4d0c668e9eb50c2149cfe36caee37c531541d1be Mon Sep 17 00:00:00 2001 From: David Zafman Date: Fri, 29 Apr 2016 15:33:44 -0700 Subject: [PATCH 2/4] scrub_test: Fixes need with wip-13507 Accept an attribute if not present as False Change required due change to dict with "epoch" and "inconsistents" Signed-off-by: David Zafman --- tasks/scrub_test.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tasks/scrub_test.py b/tasks/scrub_test.py index a2ab2c46c69..23ab8b954b1 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" @@ -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: From b25392451ec2b9a3873e66c82cd16bf8dddd9783 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Fri, 29 Apr 2016 17:46:51 -0700 Subject: [PATCH 3/4] scrub_test: Fix swapped assert error messages Signed-off-by: David Zafman --- tasks/scrub_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/scrub_test.py b/tasks/scrub_test.py index 23ab8b954b1..e8f706490d2 100644 --- a/tasks/scrub_test.py +++ b/tasks/scrub_test.py @@ -248,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) From 5c0edbae3eb35654b4efb2e6eb097014953aea12 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Sun, 1 May 2016 18:11:51 -0700 Subject: [PATCH 4/4] repair_test: Disable scheduled scrubbing to not mess up do_pg_scrub() Fixes: http://tracker.ceph.com/issues/15679 Signed-off-by: David Zafman --- tasks/repair_test.py | 3 +++ 1 file changed, 3 insertions(+) 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")