Skip to content

Commit

Permalink
fix galera sst tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vuvova committed Jun 14, 2018
1 parent 776fc87 commit c22ab56
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/wsrep_sst_common.sh
Expand Up @@ -41,15 +41,14 @@ case "$1" in
addr_no_bracket=${WSREP_SST_OPT_ADDR#\[}
readonly WSREP_SST_OPT_HOST_UNESCAPED=${addr_no_bracket%%\]*}
readonly WSREP_SST_OPT_HOST="[${WSREP_SST_OPT_HOST_UNESCAPED}]"
remain=${WSREP_SST_OPT_ADDR#*\]}
remain=${remain#*:}
;;
*)
readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*}
readonly WSREP_SST_OPT_HOST_UNESCAPED=$WSREP_SST_OPT_HOST
remain=${WSREP_SST_OPT_ADDR#*:}
;;
esac
remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST}}
remain=${remain#:}
readonly WSREP_SST_OPT_ADDR_PORT=${remain%%/*}
remain=${remain#*/}
readonly WSREP_SST_OPT_MODULE=${remain%%/*}
Expand Down

0 comments on commit c22ab56

Please sign in to comment.