From: Rishabh Dave Date: Tue, 7 May 2024 14:50:55 +0000 (+0530) Subject: qa/cephfs: set joinable on FS before exiting tests in TestFSFail X-Git-Tag: v20.0.0~1912^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=faa30e03f31551a71ebb8330dbbe7005d9ddd559;p=ceph.git qa/cephfs: set joinable on FS before exiting tests in TestFSFail After running TestFSFail, CephFSTestCase.tearDown() fails attempting to unmount CephFS. Set joinable on FS and wait for the MDS to be up before exiting the test. This will ensure that unmounting is successful in teardown. Fixes: https://tracker.ceph.com/issues/65841 Signed-off-by: Rishabh Dave --- diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index 6a84aad6f90ae..8fb6b1056b5f1 100644 --- a/qa/tasks/cephfs/test_admin.py +++ b/qa/tasks/cephfs/test_admin.py @@ -2306,6 +2306,11 @@ class TestFSFail(TestAdminCommands): retval=1, errmsgs=errmsg) self.run_ceph_cmd(f'fs fail {self.fs.name} --yes-i-really-mean-it') + # Bring and wait for MDS to be up since it is needed for unmounting + # of CephFS in CephFSTestCase.tearDown() to be successful. + self.fs.set_joinable() + self.fs.wait_for_daemons() + def test_with_health_warn_trim(self): ''' Test that, when health warning MDS_TRIM is present for an MDS, command @@ -2330,6 +2335,11 @@ class TestFSFail(TestAdminCommands): retval=1, errmsgs=errmsg) self.run_ceph_cmd(f'fs fail {self.fs.name} --yes-i-really-mean-it') + # Bring and wait for MDS to be up since it is needed for unmounting + # of CephFS in CephFSTestCase.tearDown() to be successful. + self.fs.set_joinable() + self.fs.wait_for_daemons() + def test_with_health_warn_with_2_active_MDSs(self): ''' Test that, when a CephFS has 2 active MDSs and one of them have either @@ -2354,6 +2364,11 @@ class TestFSFail(TestAdminCommands): retval=1, errmsgs=errmsg) self.run_ceph_cmd(f'fs fail {self.fs.name} --yes-i-really-mean-it') + # Bring and wait for MDS to be up since it is needed for unmounting + # of CephFS in CephFSTestCase.tearDown() to be successful. + self.fs.set_joinable() + self.fs.wait_for_daemons() + class TestMDSFail(TestAdminCommands):