]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: use config_set/config_get
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 6 Aug 2020 17:56:57 +0000 (10:56 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 7 Aug 2020 05:17:54 +0000 (22:17 -0700)
It's simpler and does not require MDS restarts.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit edc5c14d1cb194760f91dcdb0385007df32aef45)

Conflicts:
qa/tasks/cephfs/test_client_limits.py

qa/tasks/cephfs/test_client_limits.py

index 8fbb9e9bea8d203d03e75515da3858a279c14ef6..b6b2ca121c1aa8bd7f9ebeea88f82d65ecbb622e 100644 (file)
@@ -39,17 +39,13 @@ class TestClientLimits(CephFSTestCase):
         :param use_subdir: whether to put test files in a subdir or use root
         """
 
-        cache_size = open_files // 2
+        self.config_set('mds', 'mds_cache_memory_limit', "1K")
+        self.config_set('mds', 'mds_recall_max_caps', int(open_files/2))
+        self.config_set('mds', 'mds_recall_warning_threshold', open_files)
 
-        self.set_conf('mds', 'mds cache size', cache_size)
-        self.set_conf('mds', 'mds_recall_max_caps', open_files // 2)
-        self.set_conf('mds', 'mds_recall_warning_threshold', open_files)
-        self.fs.mds_fail_restart()
-        self.fs.wait_for_daemons()
-
-        mds_min_caps_per_client = int(self.fs.get_config("mds_min_caps_per_client"))
-        mds_recall_warning_decay_rate = float(self.fs.get_config("mds_recall_warning_decay_rate"))
-        self.assertTrue(open_files >= mds_min_caps_per_client)
+        mds_min_caps_per_client = int(self.config_get('mds', "mds_min_caps_per_client"))
+        mds_recall_warning_decay_rate = float(self.config_get('mds', "mds_recall_warning_decay_rate"))
+        self.assertGreaterEqual(open_files, mds_min_caps_per_client)
 
         mount_a_client_id = self.mount_a.get_global_id()
         path = "subdir" if use_subdir else "."
@@ -240,11 +236,9 @@ class TestClientLimits(CephFSTestCase):
         That the MDS will not let a client sit above mds_max_caps_per_client caps.
         """
 
-        mds_min_caps_per_client = int(self.fs.get_config("mds_min_caps_per_client"))
+        mds_min_caps_per_client = int(self.config_get('mds', "mds_min_caps_per_client"))
         mds_max_caps_per_client = 2*mds_min_caps_per_client
-        self.set_conf('mds', 'mds_max_caps_per_client', mds_max_caps_per_client)
-        self.fs.mds_fail_restart()
-        self.fs.wait_for_daemons()
+        self.config_set('mds', 'mds_max_caps_per_client', mds_max_caps_per_client)
 
         self.mount_a.create_n_files("foo/", 3*mds_max_caps_per_client, sync=True)