from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.orchestra.run import CommandFailedError
import errno
+import time
class TestMisc(CephFSTestCase):
CLIENTS_REQUIRED = 2
+
+ LOAD_SETTINGS = ["mds_session_autoclose"]
+ mds_session_autoclose = None
+
def test_getattr_caps(self):
"""
Check if MDS recognizes the 'mask' parameter of open request.
self.fs.mon_manager.raw_cluster_cmd('fs', 'new', self.fs.name,
self.fs.metadata_pool_name,
data_pool_name)
+
+ def test_evict_client(self):
+ """
+ Check that a slow client session won't get evicted if it's the
+ only session
+ """
+
+ self.mount_b.umount_wait();
+ ls_data = self.fs.mds_asok(['session', 'ls'])
+ self.assert_session_count(1, ls_data)
+
+ self.mount_a.kill();
+ self.mount_a.kill_cleanup();
+
+ time.sleep(self.mds_session_autoclose * 1.5)
+ ls_data = self.fs.mds_asok(['session', 'ls'])
+ self.assert_session_count(1, ls_data)
+
+ self.mount_a.mount()
+ self.mount_a.wait_until_mounted()
+ self.mount_b.mount()
+ self.mount_b.wait_until_mounted()
+
+ ls_data = self._session_list()
+ self.assert_session_count(2, ls_data)
+
+ self.mount_a.kill()
+ self.mount_a.kill()
+ self.mount_b.kill_cleanup()
+ self.mount_b.kill_cleanup()
+
+ time.sleep(self.mds_session_autoclose * 1.5)
+ ls_data = self.fs.mds_asok(['session', 'ls'])
+ self.assert_session_count(1, ls_data)