]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test that new mounts of same fs function after old mount is evicted 43590/head
authorJeff Layton <jlayton@redhat.com>
Tue, 19 Oct 2021 15:16:08 +0000 (11:16 -0400)
committerJeff Layton <jlayton@redhat.com>
Wed, 20 Oct 2021 14:34:01 +0000 (10:34 -0400)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
qa/tasks/cephfs/test_client_recovery.py

index 5d58c0aa8121711dce2d13ad6822d184f23b6579..96ac987e816cfbbf3507441916241cab848605f4 100644 (file)
@@ -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")