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>
ceph:
conf:
global:
- mon election default strategy: 3
osd pool default size: 3
osd pool default min size: 2
mon:
- 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
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
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