From 6d686243f16bb798eea9c24a466293ebd2b66a9d Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Thu, 6 Feb 2025 22:01:59 +0530 Subject: [PATCH] qa/cephfs: allow passing MDS ID to method that generate... MDS_CACHE_OVERSIZE warning. Signed-off-by: Rishabh Dave (cherry picked from commit 5a7834b6cd8b7dd2427e62c16f7955fa63518284) --- qa/tasks/cephfs/test_admin.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index ed350887fb5..2c6ea664d74 100644 --- a/qa/tasks/cephfs/test_admin.py +++ b/qa/tasks/cephfs/test_admin.py @@ -163,11 +163,18 @@ class TestAdminCommands(CephFSTestCase): if overwrites: self.run_ceph_cmd('osd', 'pool', 'set', n+"-data", 'allow_ec_overwrites', 'true') - def gen_health_warn_mds_cache_oversized(self): + def gen_health_warn_mds_cache_oversized(self, mds_id=None): health_warn = 'MDS_CACHE_OVERSIZED' - self.config_set('mds', 'mds_cache_memory_limit', '1K') - self.config_set('mds', 'mds_health_cache_threshold', '1.00000') + # cs_name = config section name + cs_name = None # declaring here in case no if/elif condition is true + if mds_id: + cs_name = f'mds.{mds_id}' + elif not mds_id: + cs_name = 'mds' + + self.config_set(cs_name, 'mds_cache_memory_limit', '1K') + self.config_set(cs_name, 'mds_health_cache_threshold', '1.00000') self.mount_a.open_n_background('.', 400) self.wait_for_health(health_warn, 30) -- 2.39.5