]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: config recall settings to test cache drop
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 16 Feb 2019 03:44:47 +0000 (19:44 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 19 Feb 2019 00:28:37 +0000 (16:28 -0800)
If we use the defaults, the MDS/client will recall/release everything quickly.
We want it to take time to see things like the timeout get hit.

Fixes: http://tracker.ceph.com/issues/38348
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/test_misc.py

index 08ec96909162d1a3e89b60fa97ad495e3fa1221d..737a5409683c411b53a00abd4f21872d767cedef 100644 (file)
@@ -240,10 +240,14 @@ class TestCacheDrop(CephFSTestCase):
                                                     "cache", "drop")
         return json.loads(result)
 
-    def _setup(self):
+    def _setup(self, max_caps=20, threshold=400):
         # create some files
         self.mount_a.create_n_files("dc-dir/dc-file", 1000, sync=True)
 
+        # Reduce this so the MDS doesn't rkcall the maximum for simple tests
+        self.fs.rank_asok(['config', 'set', 'mds_recall_max_caps', str(max_caps)])
+        self.fs.rank_asok(['config', 'set', 'mds_recall_max_decay_threshold', str(threshold)])
+
     def test_drop_cache_command(self):
         """
         Basic test for checking drop cache command.