From: Patrick Donnelly Date: Fri, 24 Mar 2023 21:54:35 +0000 (-0400) Subject: qa: add missing scan_links step for data scan recovery X-Git-Tag: v17.2.7~445^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=03a2d5f1127dff8b2b00d40c01862afb92ae01df;p=ceph.git qa: add missing scan_links step for data scan recovery Without, the first field remains corrupt (HEAD). Signed-off-by: Patrick Donnelly (cherry picked from commit 1b4d9077af826d1931b91938fd49e7113e8d3840) Conflicts: qa/tasks/cephfs/test_data_scan.py --- diff --git a/qa/tasks/cephfs/test_data_scan.py b/qa/tasks/cephfs/test_data_scan.py index 361fa0f027b2..d333586d28b7 100644 --- a/qa/tasks/cephfs/test_data_scan.py +++ b/qa/tasks/cephfs/test_data_scan.py @@ -402,6 +402,7 @@ class TestDataScan(CephFSTestCase): self.fs.data_scan(["init"]) self.fs.data_scan(["scan_extents", self.fs.get_data_pool_name()], worker_count=workers) self.fs.data_scan(["scan_inodes", self.fs.get_data_pool_name()], worker_count=workers) + self.fs.data_scan(["scan_links"]) # Mark the MDS repaired self.fs.mon_manager.raw_cluster_cmd('mds', 'repaired', '0') diff --git a/qa/tasks/cephfs/test_forward_scrub.py b/qa/tasks/cephfs/test_forward_scrub.py index ab97a6f596ca..f3cec881baab 100644 --- a/qa/tasks/cephfs/test_forward_scrub.py +++ b/qa/tasks/cephfs/test_forward_scrub.py @@ -129,7 +129,7 @@ class TestForwardScrub(CephFSTestCase): # Umount before flush to avoid cap releases putting # things we don't want in the journal later. self.mount_a.umount_wait() - self.fs.mds_asok(["flush", "journal"]) + self.fs.flush() # Create a new inode that's just in the log, i.e. would # look orphaned to backward scan if backward scan wisnae @@ -163,7 +163,7 @@ class TestForwardScrub(CephFSTestCase): # Run a tagging forward scrub tag = "mytag123" - self.fs.mds_asok(["tag", "path", "/parent", tag]) + self.fs.rank_asok(["tag", "path", "/parent", tag]) # See that the orphan wisnae tagged self.assertUntagged(inos['./parent/flushed/bravo']) @@ -175,14 +175,21 @@ class TestForwardScrub(CephFSTestCase): # See that journalled-but-not-flushed file *was* tagged self.assertTagged(inos['./parent/unflushed/jfile'], tag, self.fs.get_data_pool_name()) - # Run cephfs-data-scan targeting only orphans + # okay, now we are going to run cephfs-data-scan. It's necessary to + # have a clean journal otherwise replay will blowup on mismatched + # inotable versions (due to scan_links) + self.fs.flush() self.fs.fail() + self.fs.journal_tool(["journal", "reset", "--force"], 0) + + # Run cephfs-data-scan targeting only orphans self.fs.data_scan(["scan_extents", self.fs.get_data_pool_name()]) self.fs.data_scan([ "scan_inodes", "--filter-tag", tag, self.fs.get_data_pool_name() ]) + self.fs.data_scan(["scan_links"]) # After in-place injection stats should be kosher again self.fs.set_ceph_conf('mds', 'mds verify scatter', True)