]> 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>
Wed, 29 Mar 2023 17:02:56 +0000 (13:02 -0400)
Without, the first field remains corrupt (HEAD).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/test_data_scan.py
qa/tasks/cephfs/test_forward_scrub.py

index fc47d7a2fa6ccedaea63424f42da9b6edc44e63e..c73419610ce81f86bf64211389c5f9f1332ec19d 100644 (file)
@@ -402,6 +402,7 @@ class TestDataScan(CephFSTestCase):
         self.fs.data_scan(["init"])
         self.fs.data_scan(["scan_extents"], worker_count=workers)
         self.fs.data_scan(["scan_inodes"], worker_count=workers)
+        self.fs.data_scan(["scan_links"])
 
         # Mark the MDS repaired
         self.fs.mon_manager.raw_cluster_cmd('mds', 'repaired', '0')
index ab97a6f596ca1d4d615478f563f9994d3cd8ca85..f3cec881baab2aaa1f7aed6a820164238e855f15 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)