Merge pull request #51909 from NitzanMordhai/wip-nitzan-divergent-priors-test-3-pick-osd

qa/standalone/osd/divergent-prior.sh: Divergent test 3 with pg_autoscale_mode on pick divergent osd

Reviewed-by: Kamoltat (Junior) Sirivadhna <ksirivad@redhat.com>
This commit is contained in:
Yuri Weinstein 2023-07-12 14:36:45 -04:00 committed by GitHub
commit 95627c9673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -650,13 +650,28 @@ function TEST_divergent_3() {
# reproduce https://tracker.ceph.com/issues/41816
ceph osd pool set $poolname pg_autoscale_mode on
flush_pg_stats || return 1
wait_for_clean || return 1
divergent=-1
start_time=$(date +%s)
max_duration=300
while [ "$divergent" -le -1 ]
do
flush_pg_stats || return 1
wait_for_clean || return 1
# determine primary
divergent="$(ceph pg dump pgs --format=json | jq '.pg_stats[0].up_primary')"
echo "primary and soon to be divergent is $divergent"
ceph pg dump pgs
current_time=$(date +%s)
elapsed_time=$(expr $current_time - $start_time)
if [ "$elapsed_time" -gt "$max_duration" ]; then
echo "timed out waiting for divergent"
return 1
fi
done
# determine primary
local divergent="$(ceph pg dump pgs --format=json | jq '.pg_stats[0].up_primary')"
echo "primary and soon to be divergent is $divergent"
ceph pg dump pgs
local non_divergent=""
for i in $osds
do