From: Jeff Layton Date: Tue, 19 Oct 2021 15:16:08 +0000 (-0400) Subject: qa: test that new mounts of same fs function after old mount is evicted X-Git-Tag: v17.1.0~546^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=242585656c6bc282f5adbd073e83bafa86b5c0d2;p=ceph.git qa: test that new mounts of same fs function after old mount is evicted Signed-off-by: Jeff Layton --- diff --git a/qa/tasks/cephfs/test_client_recovery.py b/qa/tasks/cephfs/test_client_recovery.py index 5d58c0aa812..96ac987e816 100644 --- a/qa/tasks/cephfs/test_client_recovery.py +++ b/qa/tasks/cephfs/test_client_recovery.py @@ -489,6 +489,30 @@ class TestClientRecovery(CephFSTestCase): self.mount_a.umount_wait(require_clean=True, timeout=30) + def test_mount_after_evicted_client(self): + """Test if a new mount of same fs works after client eviction.""" + + # trash this : we need it to use same remote as mount_a + self.mount_b.umount_wait() + + cl = self.mount_a.__class__ + + # create a new instance of mount_a's class with most of the + # same settings, but mounted on mount_b's mountpoint. + m = cl(self.mount_a.ctx, self.mount_a.test_dir, self.mount_a.client_id, + self.mount_a.client_remote, self.mount_a.client_keyring_path, + self.mount_b.hostfs_mntpt, self.mount_a.cephfs_name, + self.mount_a.cephfs_mntpt, self.mount_a.ceph_brx_net) + + # evict mount_a + mount_a_client_id = self.mount_a.get_global_id() + self.fs.mds_asok(['session', 'evict', "%s" % mount_a_client_id]) + + m.mount_wait() + m.create_files() + m.check_files() + m.umount_wait(require_clean=True) + def test_stale_renew(self): if not isinstance(self.mount_a, FuseMount): self.skipTest("Require FUSE client to handle signal STOP/CONT")