]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add test for importer's unexpected client eviction after an export subtree task...
authorZhansong Gao <zhsgao@hotmail.com>
Mon, 3 Jul 2023 08:42:34 +0000 (16:42 +0800)
committerMilind Changire <mchangir@redhat.com>
Sat, 25 Jan 2025 02:04:46 +0000 (07:34 +0530)
Signed-off-by: Zhansong Gao <zhsgao@hotmail.com>
(cherry picked from commit f23bd5d0995e4e52e0ac43c7e8a112cd2faf9f27)

Conflicts:
qa/tasks/cephfs/test_exports.py
- trivial conflict resolved

qa/tasks/cephfs/filesystem.py
qa/tasks/cephfs/test_exports.py

index 02442747b82f8c60665811f872580d64d6b98c4e..71a22b9460f0fc1ffd411b3acea673347739f240 100644 (file)
@@ -617,6 +617,8 @@ class Filesystem(MDSCluster):
     def set_session_timeout(self, timeout):
         self.set_var("session_timeout", "%d" % timeout)
 
+    def set_session_autoclose(self, autoclose_time):
+        self.set_var("session_autoclose", "%d" % autoclose_time)
     def set_allow_standby_replay(self, yes):
         self.set_var("allow_standby_replay", yes)
 
index 62ca00c4e1fdc397d014135d870f6e5c0b892e8a..e0c77e1d5771a4474d896d94df77eb49e069e296 100644 (file)
@@ -646,3 +646,25 @@ class TestKillExports(CephFSTestCase):
 
             # for multiple tests
             self.mount_a.remount()
+
+    def test_client_eviction(self):
+        # modify the timeout so that we don't have to wait too long
+        timeout = 30
+        self.fs.set_session_timeout(timeout)
+        self.fs.set_session_autoclose(timeout + 5)
+
+        kill_export_at = [9, 10]
+
+        exporter_rank = 0
+        importer_rank = 1
+
+        for kill in kill_export_at:
+            log.info(f"kill_export_at: {kill}")
+            self._run_kill_export(kill, exporter_rank, importer_rank)
+
+            client_id = self.mount_a.get_global_id()
+            self.wait_until_evicted(client_id, importer_rank, timeout + 10)
+            time.sleep(1)
+
+            # failed if buggy
+            self.mount_a.ls()