fix: use consistent ports in verify-healing (#13813)

also use unique directories in setup testing.
This commit is contained in:
Harshavardhana 2021-12-02 12:40:48 -08:00 committed by GitHub
parent acfb83ec5e
commit 2c6983a2f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -66,7 +66,7 @@ function start_minio_pool_erasure_sets_ipv6()
{ {
export MINIO_ROOT_USER=$ACCESS_KEY export MINIO_ROOT_USER=$ACCESS_KEY
export MINIO_ROOT_PASSWORD=$SECRET_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]:9000" > "$WORK_DIR/pool-minio-ipv6-9000.log" 2>&1 &
"${MINIO[@]}" server --address="[::1]:9001" > "$WORK_DIR/pool-minio-ipv6-9001.log" 2>&1 & "${MINIO[@]}" server --address="[::1]:9001" > "$WORK_DIR/pool-minio-ipv6-9001.log" 2>&1 &

View File

@ -18,7 +18,7 @@ function start_minio_3_node() {
export MINIO_ROOT_PASSWORD=minio123 export MINIO_ROOT_PASSWORD=minio123
export MINIO_ERASURE_SET_DRIVE_COUNT=6 export MINIO_ERASURE_SET_DRIVE_COUNT=6
start_port=$(shuf -i 10000-65000 -n 1) start_port=$2
args="" args=""
for i in $(seq 1 3); do 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/" 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() { function perform_test() {
start_minio_3_node 120 start_minio_3_node 120 $2
echo "Testing Distributed Erasure setup healing of drives" echo "Testing Distributed Erasure setup healing of drives"
echo "Remove the contents of the disks belonging to '${1}' erasure set" echo "Remove the contents of the disks belonging to '${1}' erasure set"
rm -rf ${WORK_DIR}/${1}/*/ rm -rf ${WORK_DIR}/${1}/*/
start_minio_3_node 120 start_minio_3_node 120 $2
rv=$(check_online) rv=$(check_online)
if [ "$rv" == "1" ]; then if [ "$rv" == "1" ]; then
@ -109,9 +109,12 @@ function perform_test() {
function main() function main()
{ {
perform_test "2" # use same ports for all tests
perform_test "1" start_port=$(shuf -i 10000-65000 -n 1)
perform_test "3"
perform_test "2" ${start_port}
perform_test "1" ${start_port}
perform_test "3" ${start_port}
} }
( __init__ "$@" && main "$@" ) ( __init__ "$@" && main "$@" )