]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Tue, 21 Nov 2023 06:41:53 +0000 (12:11 +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>
qa/tasks/cephfs/test_data_scan.py

index 63ac60415475ca4b6e6d0eb07e528f2c1f47b352..5a7c96996f9ed1a65f6dbfd229fd9a455928d110 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