From 872d20b7e970486066a0d2548573b3e702419bf1 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Thu, 22 Aug 2024 15:57:25 +0800 Subject: [PATCH] qa/cephfs: fix TestRenameCommand and unmount the clinet before failing fs We should else bring and wait for MDS to be up since it is needed for unmounting of CephFS in CephFSTestCase.tearDown() to be successful, or just unmount the mountpoints before failing the filesystem. Since the mountpoint won't be used in later tests so we just unmount it. Fixes: https://tracker.ceph.com/issues/66946 Signed-off-by: Xiubo Li (cherry picked from commit ae3faac004e64fa2e3bd4a3ff0d823db4da2685c) Conflicts: - Just fixed the code needed in reef. --- qa/tasks/cephfs/test_admin.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index 34dc59ab2a2..657f53d8de7 100644 --- a/qa/tasks/cephfs/test_admin.py +++ b/qa/tasks/cephfs/test_admin.py @@ -1827,6 +1827,9 @@ class TestFSFail(TestAdminCommands): health_warn = 'MDS_CACHE_OVERSIZED' self.gen_health_warn_mds_cache_oversized() + # Failing the file system breaks this mount + self.mount_a.umount_wait(require_clean=True) + # actual testing begins now. self.negtest_ceph_cmd(args=f'fs fail {self.fs.name}', retval=1, errmsgs=health_warn) @@ -1846,6 +1849,9 @@ class TestFSFail(TestAdminCommands): health_warn = 'MDS_TRIM' self.gen_health_warn_mds_trim() + # Failing the file system breaks this mount + self.mount_a.umount_wait(require_clean=True) + # actual testing begins now. self.negtest_ceph_cmd(args=f'fs fail {self.fs.name}', retval=1, errmsgs=health_warn) @@ -1867,6 +1873,9 @@ class TestFSFail(TestAdminCommands): self.fs.set_max_mds(2) self.gen_health_warn_mds_cache_oversized() + # Failing the file system breaks this mount + self.mount_a.umount_wait(require_clean=True) + # actual testing begins now. self.negtest_ceph_cmd(args=f'fs fail {self.fs.name}', retval=1, errmsgs=health_warn) -- 2.39.5