From 7c3642a305af6e62ca225a4cdf37d337cb4c00d7 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Fri, 5 May 2023 18:41:54 +0800 Subject: [PATCH] qa: fix journal flush failure issue due to the MDS daemon crashes After the MDS daemon crashing, the journal flush request will fail. Signed-off-by: Xiubo Li (cherry picked from commit d851a9475c30d0b6fa4418c38d04fd602bc785eb) --- qa/tasks/cephfs/test_misc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephfs/test_misc.py b/qa/tasks/cephfs/test_misc.py index e72f5a59963a1..2405b7a9f7719 100644 --- a/qa/tasks/cephfs/test_misc.py +++ b/qa/tasks/cephfs/test_misc.py @@ -472,14 +472,15 @@ class TestSkipReplayInoTable(CephFSTestCase): # This will make the MDS crash, since we only have one MDS in the # cluster and without the "wait=False" it will stuck here forever. self.mount_a.run_shell(["mkdir", "test_alloc_ino/dir1"], wait=False) - self.fs.mds_asok(['flush', 'journal']) + + # sleep 10 seconds to make sure the journal logs are flushed and + # the mds crashes + time.sleep(10) # Now set the mds config to skip replaying the inotable self.fs.set_ceph_conf('mds', 'mds_inject_skip_replaying_inotable', True) self.fs.set_ceph_conf('mds', 'mds_wipe_sessions', True) - # sleep 5 seconds to make sure the journal log is flushed and applied - time.sleep(5) self.fs.mds_restart() # sleep 5 seconds to make sure the mds tell command won't stuck time.sleep(5) -- 2.39.5