Skip to content

Commit de2d918

Browse files
author
Laura Flores
committed
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 <[email protected]>
1 parent 1e2b3e5 commit de2d918

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

qa/suites/rados/singleton/all/stretch-mode-5-mons-8-osds.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ overrides:
2626
ceph:
2727
conf:
2828
global:
29-
mon election default strategy: 3
3029
osd pool default size: 3
3130
osd pool default min size: 2
3231
mon:
@@ -55,4 +54,4 @@ tasks:
5554
- mon/mon-stretch-mode-5-mons-8-osds.sh
5655
- cephfs_test_runner:
5756
modules:
58-
- tasks.stretch_mode_disable_enable
57+
- tasks.stretch_mode_disable_enable

qa/workunits/mon/mon-stretch-mode-5-mons-8-osds.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ if [ $NUM_OSDS_UP -lt 8 ]; then
99
exit 1
1010
fi
1111

12+
# ensure election strategy is set to "connectivity"
13+
# See https://tracker.ceph.com/issues/69107
14+
ceph mon set election_strategy connectivity
15+
1216
for dc in dc1 dc2
1317
do
1418
ceph osd crush add-bucket $dc datacenter
@@ -65,4 +69,4 @@ EOF
6569
crushtool --compile crushmap_modified.txt -o crushmap.bin
6670
ceph osd setcrushmap -i crushmap.bin
6771

68-
ceph mon enable_stretch_mode e stretch_rule datacenter
72+
ceph mon enable_stretch_mode e stretch_rule datacenter

0 commit comments

Comments
 (0)