Skip to content

Commit c22ab56

Browse files
committed
fix galera sst tests
note that ${A#foo} is $A if there's no prefix foo. That's why galera nodes tried to connect to 127.0.0.1:127.0.0.1 if there was no port in the address Followup for 2b35db5
1 parent 776fc87 commit c22ab56

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/wsrep_sst_common.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,14 @@ case "$1" in
4141
addr_no_bracket=${WSREP_SST_OPT_ADDR#\[}
4242
readonly WSREP_SST_OPT_HOST_UNESCAPED=${addr_no_bracket%%\]*}
4343
readonly WSREP_SST_OPT_HOST="[${WSREP_SST_OPT_HOST_UNESCAPED}]"
44-
remain=${WSREP_SST_OPT_ADDR#*\]}
45-
remain=${remain#*:}
4644
;;
4745
*)
4846
readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*}
4947
readonly WSREP_SST_OPT_HOST_UNESCAPED=$WSREP_SST_OPT_HOST
50-
remain=${WSREP_SST_OPT_ADDR#*:}
5148
;;
5249
esac
50+
remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST}}
51+
remain=${remain#:}
5352
readonly WSREP_SST_OPT_ADDR_PORT=${remain%%/*}
5453
remain=${remain#*/}
5554
readonly WSREP_SST_OPT_MODULE=${remain%%/*}

0 commit comments

Comments
 (0)