]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: set mds config with `config set` for a particular test
authorVenky Shankar <vshankar@redhat.com>
Mon, 20 Nov 2023 05:44:24 +0000 (00:44 -0500)
committerVenky Shankar <vshankar@redhat.com>
Wed, 13 Mar 2024 13:49:41 +0000 (19:19 +0530)
The config setting is persisted in ceph.conf after the MDSs are started.
However, the test case fails the file system causing the active MDS to
restart and pick up the new config. When the file system is marked joinable,
then, if the MDS which was standby before the file system was marked failed
takes over as the rank, the updated setting are not used by this MDS.

In the failed test, merging directory fragment is disabled, but since
the config is set in ceph.conf, the (earlier standby) MDS which acquires
a rank uses the default merge size causing the dirfrag to merge and
thereby tripping the test.

Fixes: http://tracker.ceph.com/issues/57087
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 2958a7cd1259cdfb6e04ebc5047cadb86bf90707)

qa/tasks/cephfs/test_data_scan.py

index 9a93bd622126d46fb326f236deeecb8b49850aa9..8168d5cb2a45b0b40cd0a2d3ef63ff878aae8c03 100644 (file)
@@ -491,10 +491,11 @@ class TestDataScan(CephFSTestCase):
 
         file_count = 100
         file_names = ["%s" % n for n in range(0, file_count)]
+        split_size = 100 * file_count
 
         # Make sure and disable dirfrag auto merging and splitting
-        self.fs.set_ceph_conf('mds', 'mds bal merge size', 0)
-        self.fs.set_ceph_conf('mds', 'mds bal split size', 100 * file_count)
+        self.fs.mon_manager.run_cluster_cmd(args='config set mds mds_bal_merge_size 0')
+        self.fs.mon_manager.run_cluster_cmd(args=f'config set mds mds_bal_split_size {split_size}')
 
         # Create a directory of `file_count` files, each named after its
         # decimal number and containing the string of its decimal number