From: Xiubo Li Date: Mon, 15 Jul 2024 06:08:17 +0000 (+0800) Subject: qa/cephfs: fix TestRenameCommand and unmount the clinet before failing fs X-Git-Tag: testing/wip-rishabh-testing-20240908.191426-squid-debug^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=672b4ebcde2de61f53a77d79ce7ef8af0126f7fd;p=ceph-ci.git 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) --- diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index 7c149658bb8..534b56c4935 100644 --- a/qa/tasks/cephfs/test_admin.py +++ b/qa/tasks/cephfs/test_admin.py @@ -994,6 +994,9 @@ class TestRenameCommand(TestAdminCommands): """ That renaming a file system without '--yes-i-really-mean-it' flag fails. """ + # Failing the file system breaks this mount + self.mount_a.umount_wait(require_clean=True) + self.run_ceph_cmd(f'fs fail {self.fs.name}') self.run_ceph_cmd(f'fs set {self.fs.name} refuse_client_session true') sleep(5) @@ -1016,6 +1019,9 @@ class TestRenameCommand(TestAdminCommands): """ That renaming a non-existent file system fails. """ + # Failing the file system breaks this mount + self.mount_a.umount_wait(require_clean=True) + self.run_ceph_cmd(f'fs fail {self.fs.name}') self.run_ceph_cmd(f'fs set {self.fs.name} refuse_client_session true') sleep(5) @@ -1036,6 +1042,9 @@ class TestRenameCommand(TestAdminCommands): """ self.fs2 = self.mds_cluster.newfs(name='cephfs2', create=True) + # let's unmount the client before failing the FS + self.mount_a.umount_wait(require_clean=True) + self.run_ceph_cmd(f'fs fail {self.fs.name}') self.run_ceph_cmd(f'fs set {self.fs.name} refuse_client_session true') sleep(5) @@ -1059,6 +1068,9 @@ class TestRenameCommand(TestAdminCommands): orig_fs_name = self.fs.name new_fs_name = 'new_cephfs' + # let's unmount the client before failing the FS + self.mount_a.umount_wait(require_clean=True) + self.run_ceph_cmd(f'fs mirror enable {orig_fs_name}') self.run_ceph_cmd(f'fs fail {self.fs.name}') self.run_ceph_cmd(f'fs set {self.fs.name} refuse_client_session true')