Skip to content

Commit faa30e0

Browse files
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 <[email protected]>
1 parent c2fb936 commit faa30e0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

qa/tasks/cephfs/test_admin.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,6 +2306,11 @@ def test_with_health_warn_oversize_cache(self):
23062306
retval=1, errmsgs=errmsg)
23072307
self.run_ceph_cmd(f'fs fail {self.fs.name} --yes-i-really-mean-it')
23082308

2309+
# Bring and wait for MDS to be up since it is needed for unmounting
2310+
# of CephFS in CephFSTestCase.tearDown() to be successful.
2311+
self.fs.set_joinable()
2312+
self.fs.wait_for_daemons()
2313+
23092314
def test_with_health_warn_trim(self):
23102315
'''
23112316
Test that, when health warning MDS_TRIM is present for an MDS, command
@@ -2330,6 +2335,11 @@ def test_with_health_warn_trim(self):
23302335
retval=1, errmsgs=errmsg)
23312336
self.run_ceph_cmd(f'fs fail {self.fs.name} --yes-i-really-mean-it')
23322337

2338+
# Bring and wait for MDS to be up since it is needed for unmounting
2339+
# of CephFS in CephFSTestCase.tearDown() to be successful.
2340+
self.fs.set_joinable()
2341+
self.fs.wait_for_daemons()
2342+
23332343
def test_with_health_warn_with_2_active_MDSs(self):
23342344
'''
23352345
Test that, when a CephFS has 2 active MDSs and one of them have either
@@ -2354,6 +2364,11 @@ def test_with_health_warn_with_2_active_MDSs(self):
23542364
retval=1, errmsgs=errmsg)
23552365
self.run_ceph_cmd(f'fs fail {self.fs.name} --yes-i-really-mean-it')
23562366

2367+
# Bring and wait for MDS to be up since it is needed for unmounting
2368+
# of CephFS in CephFSTestCase.tearDown() to be successful.
2369+
self.fs.set_joinable()
2370+
self.fs.wait_for_daemons()
2371+
23572372

23582373
class TestMDSFail(TestAdminCommands):
23592374

0 commit comments

Comments
 (0)