From 2c6983a2f1eb186c348a62b79f6e2088ee23bfe6 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 2 Dec 2021 12:40:48 -0800 Subject: [PATCH] fix: use consistent ports in verify-healing (#13813) also use unique directories in setup testing. --- buildscripts/verify-build.sh | 2 +- buildscripts/verify-healing.sh | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/buildscripts/verify-build.sh b/buildscripts/verify-build.sh index 4a9e228e9..7f93c19fb 100755 --- a/buildscripts/verify-build.sh +++ b/buildscripts/verify-build.sh @@ -66,7 +66,7 @@ function start_minio_pool_erasure_sets_ipv6() { export MINIO_ROOT_USER=$ACCESS_KEY export MINIO_ROOT_PASSWORD=$SECRET_KEY - export MINIO_ENDPOINTS="http://[::1]:9000${WORK_DIR}/pool-disk-sets{1...4} http://[::1]:9001${WORK_DIR}/pool-disk-sets{5...8}" + export MINIO_ENDPOINTS="http://[::1]:9000${WORK_DIR}/pool-disk-sets-ipv6{1...4} http://[::1]:9001${WORK_DIR}/pool-disk-sets-ipv6{5...8}" "${MINIO[@]}" server --address="[::1]:9000" > "$WORK_DIR/pool-minio-ipv6-9000.log" 2>&1 & "${MINIO[@]}" server --address="[::1]:9001" > "$WORK_DIR/pool-minio-ipv6-9001.log" 2>&1 & diff --git a/buildscripts/verify-healing.sh b/buildscripts/verify-healing.sh index 595c82bac..8a72e808a 100755 --- a/buildscripts/verify-healing.sh +++ b/buildscripts/verify-healing.sh @@ -18,7 +18,7 @@ function start_minio_3_node() { export MINIO_ROOT_PASSWORD=minio123 export MINIO_ERASURE_SET_DRIVE_COUNT=6 - start_port=$(shuf -i 10000-65000 -n 1) + start_port=$2 args="" for i in $(seq 1 3); do args="$args http://127.0.0.1:$[$start_port+$i]${WORK_DIR}/$i/1/ http://127.0.0.1:$[$start_port+$i]${WORK_DIR}/$i/2/ http://127.0.0.1:$[$start_port+$i]${WORK_DIR}/$i/3/ http://127.0.0.1:$[$start_port+$i]${WORK_DIR}/$i/4/ http://127.0.0.1:$[$start_port+$i]${WORK_DIR}/$i/5/ http://127.0.0.1:$[$start_port+$i]${WORK_DIR}/$i/6/" @@ -85,14 +85,14 @@ function __init__() } function perform_test() { - start_minio_3_node 120 + start_minio_3_node 120 $2 echo "Testing Distributed Erasure setup healing of drives" echo "Remove the contents of the disks belonging to '${1}' erasure set" rm -rf ${WORK_DIR}/${1}/*/ - start_minio_3_node 120 + start_minio_3_node 120 $2 rv=$(check_online) if [ "$rv" == "1" ]; then @@ -109,9 +109,12 @@ function perform_test() { function main() { - perform_test "2" - perform_test "1" - perform_test "3" + # use same ports for all tests + start_port=$(shuf -i 10000-65000 -n 1) + + perform_test "2" ${start_port} + perform_test "1" ${start_port} + perform_test "3" ${start_port} } ( __init__ "$@" && main "$@" )