1
0
Fork 0

Allow rebalance to start in test_interrupted_rebalance, raise etcd start timeout

hier-failure-domains
Vitaliy Filippov 2023-05-12 23:16:20 +03:00
parent da82754baa
commit e69d459d43
3 changed files with 8 additions and 5 deletions

View File

@ -53,12 +53,12 @@ start_etcd()
for i in $(seq 1 $ETCD_COUNT); do
start_etcd $i
done
for i in {1..10}; do
for i in {1..30}; do
${ETCD}ctl --endpoints=$ETCD_URL --dial-timeout=1s --command-timeout=1s member list >/dev/null && break
if [[ $i = 30 ]]; then
format_error "Failed to start etcd"
fi
done
if [[ $i = 10 ]]; then
format_error "Failed to start etcd"
fi
echo leak:fio >> testdata/lsan-suppress.txt
echo leak:tcmalloc >> testdata/lsan-suppress.txt

View File

@ -21,7 +21,7 @@ try_change()
$ETCDCTL put /vitastor/config/pools '{"1":{'$POOLCFG',"pg_size":'$PG_SIZE',"pg_minsize":'$PG_MINSIZE',"pg_count":'$n'}}'
for i in {1..10}; do
for i in {1..60}; do
($ETCDCTL get /vitastor/config/pgs --print-value-only | jq -s -e '(.[0].items["1"] | map((.osd_set | select(. > 0)) | length == 2) | length) == '$n) && \
($ETCDCTL get --prefix /vitastor/pg/state/ --print-value-only | jq -s -e '([ .[] | select(.state == ["active"] or .state == ["active", "has_misplaced"]) ] | length) == '$n'') && \
break

View File

@ -30,6 +30,9 @@ try_reweight 4 1
try_reweight 5 1
# Allow rebalance to start
sleep 5
# Wait for the rebalance to finish
wait_finish_rebalance 300