From de2d9186bddbd452d2e7939723418c200e3fec46 Mon Sep 17 00:00:00 2001 From: Laura Flores Date: Tue, 3 Dec 2024 16:15:19 -0600 Subject: [PATCH] qa/workunits/mon: ensure election strategy is "connectivity" for stretch mode 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 --- .../rados/singleton/all/stretch-mode-5-mons-8-osds.yaml | 3 +-- qa/workunits/mon/mon-stretch-mode-5-mons-8-osds.sh | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qa/suites/rados/singleton/all/stretch-mode-5-mons-8-osds.yaml b/qa/suites/rados/singleton/all/stretch-mode-5-mons-8-osds.yaml index d7b10c50a943b..69a54b0f1b772 100644 --- a/qa/suites/rados/singleton/all/stretch-mode-5-mons-8-osds.yaml +++ b/qa/suites/rados/singleton/all/stretch-mode-5-mons-8-osds.yaml @@ -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 diff --git a/qa/workunits/mon/mon-stretch-mode-5-mons-8-osds.sh b/qa/workunits/mon/mon-stretch-mode-5-mons-8-osds.sh index ded1385416083..827fb0a0b138c 100755 --- a/qa/workunits/mon/mon-stretch-mode-5-mons-8-osds.sh +++ b/qa/workunits/mon/mon-stretch-mode-5-mons-8-osds.sh @@ -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