]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephfs: allow passing MDS ID to method that generate...
authorRishabh Dave <ridave@redhat.com>
Thu, 6 Feb 2025 16:31:59 +0000 (22:01 +0530)
committerJos Collin <jcollin@redhat.com>
Fri, 3 Oct 2025 02:35:17 +0000 (08:05 +0530)
MDS_CACHE_OVERSIZE warning.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 5a7834b6cd8b7dd2427e62c16f7955fa63518284)

qa/tasks/cephfs/test_admin.py

index ed350887fb54557864c92f6f2613481a8cdf4aba..2c6ea664d7419a365d2ae669dab12dcb85336566 100644 (file)
@@ -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)