]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add missing scan_links step for data scan recovery
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 24 Mar 2023 21:54:35 +0000 (17:54 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 30 Mar 2023 12:40:50 +0000 (08:40 -0400)
Without, the first field remains corrupt (HEAD).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 1b4d9077af826d1931b91938fd49e7113e8d3840)

Conflicts:
qa/tasks/cephfs/test_data_scan.py

qa/tasks/cephfs/test_data_scan.py
qa/tasks/cephfs/test_forward_scrub.py

index dcb7eda40a56df8afb6c6a7a32bceb7fd7115e48..9e248dc3989eddb142d06404acc1eb86bd63375d 100644 (file)
@@ -368,6 +368,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')
index 82630e069587b7105c524f93add50e8237eac45b..29496dc50ac30718fdc1c9c609ca4ef90e7089f1 100644 (file)
@@ -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)