summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_mariabackup.sh
diff options
context:
space:
mode:
authorJulius Goryavsky <sysprg@gmail.com>2019-02-01 17:45:15 +0100
committerMarko Mäkelä <marko.makela@mariadb.com>2019-02-02 11:40:32 +0200
commitdfc9bff5a9f402ebe9beff2912aab2f53b0c27ad (patch)
tree89114e19e383a67095b6a56d0f2abe055364b498 /scripts/wsrep_sst_mariabackup.sh
parent081fd8bfa280635a7e699a17b035032460cb5160 (diff)
downloadmariadb-git-dfc9bff5a9f402ebe9beff2912aab2f53b0c27ad.tar.gz
MDEV-18379: IPv6 compatibility changes/Unification of check for IPv6
This patch contains the port of the MDEV-18379 patch for 10.2 branch, but also includes a number of changes made within MDEV-17835, which are necessary for the normal operation of tests that use IPv6: 1) Currently, the three-node mtr suite for Galera (galera_3nodes) uses a separate IPv6 availability check using the "have_ipv6.inc" file. This check duplicates a more accurate check at suite.pm level, which can be used by including the file "check_ipv6.inc". This patch removes this discrepancy between suites. 2) Fixed numerous bugs in the SST scripts and in the mtr test files (galera_3nodes mtr suite) that prevented the use of Galera with IPv6 addresses. 3) Fixed flaws in the galera_3nodes mtr suite control scripts, because of which they could not work with mariabackup. 4) Fixed flaws in the rsync and mysqldump tests (for galera_3nodes mtr tests suite). These tests were not performed successfully without these fixes. 5) GAL-501 test in the galera_3nodes suite does not contain the option "--bind-address=::" that is needed for the test to work correctly with IPv6 (at least on some systems), since without it the server will not wait for connections on the IPv6 interface. https://jira.mariadb.org/browse/MDEV-18379 and partially https://jira.mariadb.org/browse/MDEV-17835
Diffstat (limited to 'scripts/wsrep_sst_mariabackup.sh')
-rw-r--r--scripts/wsrep_sst_mariabackup.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 2eedbb4b189..039a350b18a 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -522,7 +522,7 @@ kill_xtrabackup()
setup_ports()
{
if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then
- if [[ ${WSREP_SST_OPT_ADDR:0:1} == '[' ]];then
+ if [ "${WSREP_SST_OPT_ADDR#\[}" != "$WSREP_SST_OPT_ADDR" ]; then
remain=$(echo $WSREP_SST_OPT_ADDR | awk -F '\\][:/]' '{ print $2 }')
REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F '\\]:' '{ print $1 }')"]"
SST_PORT=$(echo $remain | awk -F '[:/]' '{ print $1 }')
@@ -535,7 +535,7 @@ setup_ports()
sst_ver=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $5 }')
fi
else
- if [[ ${WSREP_SST_OPT_ADDR:0:1} == '[' ]];then
+ if [ "${WSREP_SST_OPT_ADDR#\[}" != "$WSREP_SST_OPT_ADDR" ]; then
SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F '\\]:' '{ print $2 }')
else
SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $2 }')
@@ -957,7 +957,7 @@ then
if [ -z "${SST_PORT}" ]
then
SST_PORT=4444
- if [[ ${ADDR:0:1} == '[' ]];then
+ if [ "${ADDR#\[}" != "$ADDR" ]; then
ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F '\\]:' '{ print $1 }')]:${SST_PORT}"
else
ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $1 }'):${SST_PORT}"