]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephfs: add test to verify backtrace update failure on deleted data pool
authorVenky Shankar <vshankar@redhat.com>
Fri, 3 May 2024 11:16:42 +0000 (07:16 -0400)
committerVenky Shankar <vshankar@redhat.com>
Tue, 20 Aug 2024 07:07:47 +0000 (07:07 +0000)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
qa/tasks/cephfs/test_backtrace.py

index 6b094569b7b17c483ea7b5ad6d1aa58d1c7856f9..cd23c114bfb86736909acdd5be6f2959a7e60908 100644 (file)
@@ -100,3 +100,29 @@ class TestBacktrace(CephFSTestCase):
         # we don't update the layout in all the old pools whenever it changes
         old_pool_layout = self.fs.read_layout(file_ino, pool=old_data_pool_name)
         self.assertEqual(old_pool_layout['object_size'], 4194304)
+
+    def test_backtrace_flush_on_deleted_data_pool(self):
+        """
+        that the MDS does not go read-only when handling backtrace update errors
+        when backtrace updates are batched and flushed to RADOS (during journal trim)
+        and some of the pool have been removed.
+        """
+        data_pool = self.fs.get_data_pool_name()
+        extra_data_pool_name_1 = data_pool + '_extra1'
+        self.fs.add_data_pool(extra_data_pool_name_1)
+
+        self.mount_a.run_shell(["mkdir", "dir_x"])
+        self.mount_a.setfattr("dir_x", "ceph.dir.layout.pool", extra_data_pool_name_1)
+        self.mount_a.run_shell(["touch", "dir_x/file_x"])
+        self.fs.flush()
+
+        extra_data_pool_name_2 = data_pool + '_extra2'
+        self.fs.add_data_pool(extra_data_pool_name_2)
+        self.mount_a.setfattr("dir_x/file_x", "ceph.file.layout.pool", extra_data_pool_name_2)
+        self.mount_a.run_shell(["setfattr", "-x", "ceph.dir.layout", "dir_x"])
+        self.run_ceph_cmd("fs", "rm_data_pool", self.fs.name, extra_data_pool_name_1)
+        self.fs.flush()
+
+        # quick test to check if the mds has handled backtrace update failure
+        # on the deleted data pool without going read-only.
+        self.mount_a.run_shell(["mkdir", "dir_y"])