]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/mon: ensure election strategy is "connectivity" for stretch mode 60927/head
authorLaura Flores <lflores@ibm.com>
Tue, 3 Dec 2024 22:15:19 +0000 (16:15 -0600)
committerLaura Flores <lflores@ibm.com>
Tue, 3 Dec 2024 22:15:19 +0000 (16:15 -0600)
The election strategy is randomly chosen for this type of test. Sometimes,
the test passes if the "connectivity" election strategy happens to be picked.
But if a different strategy, i.e. "classic", is picked, then the test will fail.

We can ensure that the election strategy is "connectivity" by setting it in the
workunit with the ceph CLI command. Although connectivity was specified in
stretch-mode-5-mons-8-osds.yaml, that config ultimately gets overridden by
the "qa/mon_config" yaml.

Fixes: https://tracker.ceph.com/issues/69107
Signed-off-by: Laura Flores <lflores@ibm.com>
qa/suites/rados/singleton/all/stretch-mode-5-mons-8-osds.yaml
qa/workunits/mon/mon-stretch-mode-5-mons-8-osds.sh

index d7b10c50a943b09a9da9d456c23e14f5eb04e64c..69a54b0f1b772a89738ac3be98600a1feb0dca9d 100644 (file)
@@ -26,7 +26,6 @@ overrides:
   ceph:
     conf:
       global:
-        mon election default strategy: 3
         osd pool default size: 3
         osd pool default min size: 2
       mon:
@@ -55,4 +54,4 @@ tasks:
         - mon/mon-stretch-mode-5-mons-8-osds.sh
 - cephfs_test_runner:
     modules:
-      - tasks.stretch_mode_disable_enable
\ No newline at end of file
+      - tasks.stretch_mode_disable_enable
index ded1385416083d6bc7690da9350c26e7bfc94b82..827fb0a0b138c0545951c55a93c63025934de90b 100755 (executable)
@@ -9,6 +9,10 @@ if [ $NUM_OSDS_UP -lt 8 ]; then
     exit 1
 fi
 
+# ensure election strategy is set to "connectivity"
+# See https://tracker.ceph.com/issues/69107
+ceph mon set election_strategy connectivity
+
 for dc in dc1 dc2
     do
       ceph osd crush add-bucket $dc datacenter
@@ -65,4 +69,4 @@ EOF
 crushtool --compile crushmap_modified.txt -o crushmap.bin
 ceph osd setcrushmap -i crushmap.bin
 
-ceph mon enable_stretch_mode e stretch_rule datacenter
\ No newline at end of file
+ceph mon enable_stretch_mode e stretch_rule datacenter