From b7cf7acfdada25fa2971415c153cf0c2f8cb37b8 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 13 Mar 2024 15:16:16 +0530 Subject: [PATCH] qa: Test lost+found object removal without unmounting client Signed-off-by: Kotresh HR --- qa/tasks/cephfs/test_data_scan.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qa/tasks/cephfs/test_data_scan.py b/qa/tasks/cephfs/test_data_scan.py index 49c609c78af4..99cbda147349 100644 --- a/qa/tasks/cephfs/test_data_scan.py +++ b/qa/tasks/cephfs/test_data_scan.py @@ -395,7 +395,7 @@ class TestDataScan(CephFSTestCase): mds_map = self.fs.get_mds_map() return rank in mds_map['damaged'] - def _rebuild_metadata(self, workload, workers=1): + def _rebuild_metadata(self, workload, workers=1, unmount=True): """ That when all objects in metadata pool are removed, we can rebuild a metadata pool based on the contents of a data pool, and a client can see and read our files. @@ -407,7 +407,8 @@ class TestDataScan(CephFSTestCase): # Unmount the client and flush the journal: the tool should also cope with # situations where there is dirty metadata, but we'll test that separately - self.mount_a.umount_wait() + if unmount: + self.mount_a.umount_wait() workload.flush() # Stop the MDS @@ -469,7 +470,8 @@ class TestDataScan(CephFSTestCase): workload.scrub() # Mount a client - self.mount_a.mount_wait() + if unmount: + self.mount_a.mount_wait() # See that the files are present and correct errors = workload.validate() @@ -495,7 +497,7 @@ class TestDataScan(CephFSTestCase): self._rebuild_metadata(BacktracelessFile(self.fs, self.mount_a)) def test_rebuild_backtraceless_with_lf_dir_removed(self): - self._rebuild_metadata(BacktracelessFileRemoveLostAndFoundDirectory(self.fs, self.mount_a)) + self._rebuild_metadata(BacktracelessFileRemoveLostAndFoundDirectory(self.fs, self.mount_a), unmount=False) def test_rebuild_moved_dir(self): self._rebuild_metadata(MovedDir(self.fs, self.mount_a)) -- 2.47.3