summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2018-06-07 17:12:38 +0300
committersjaakola <seppo.jaakola@iki.fi>2018-06-07 17:12:38 +0300
commit15c6d6a94a20053ded2e115d21e7d285b583c9ef (patch)
treec325ad86aa0bd34e6dffe02af767123b899dd1b9
parent3627dd7f6a1cf5bd7151ff23290d64cb6dffea90 (diff)
downloadmariadb-git-15c6d6a94a20053ded2e115d21e7d285b583c9ef.tar.gz
MDEV-14612 wsrep_sst_mariabackup unnecessarily converts address to host name
SST script for mariabackup (wsrep_sst_mariabackup.sh) does reverse DNS to convert the joiner's IP address to domain name, and this is not always a wanted feature. It is not understood why this remote host DNS conversion is in the script, in the first place, but conversion was originally added by commit: commit 3d8aacba861044843417b710fff208b8bd6a53c4 Author: Nirbhay Choubey <nirbhay.choubey@gmail.com> Date: Wed Feb 22 15:58:45 2017 -0500 In this commit, REMOTEHOST variable is removed and replaced by REMOTEIP. All references to joiner is therefore by IP address only.
-rw-r--r--scripts/wsrep_sst_mariabackup.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 549161aa8f3..8bc5954e45a 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -33,7 +33,6 @@ ssystag=""
XTRABACKUP_PID=""
SST_PORT=""
REMOTEIP=""
-REMOTEHOST=""
tcert=""
tpem=""
tkey=""
@@ -225,7 +224,7 @@ get_transfer()
tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${tpem},cafile=${tcert}${sockopt} stdio"
else
wsrep_log_info "Encrypting with cert=${tpem}, cafile=${tcert}"
- tcmd="socat -u stdio openssl-connect:${REMOTEHOST}:${TSST_PORT},cert=${tpem},cafile=${tcert}${sockopt}"
+ tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tpem},cafile=${tcert}${sockopt}"
fi
elif [[ $encrypt -eq 3 ]];then
wsrep_log_info "Using openssl based encryption with socat: with key and crt"
@@ -248,7 +247,7 @@ get_transfer()
tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tpem},key=${tkey},verify=0${sockopt}"
else
wsrep_log_info "Encrypting with cert=${tpem}, key=${tkey}, cafile=${tcert}"
- tcmd="socat -u stdio openssl-connect:${REMOTEHOST}:${TSST_PORT},cert=${tpem},key=${tkey},cafile=${tcert}${sockopt}"
+ tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tpem},key=${tkey},cafile=${tcert}${sockopt}"
fi
fi
@@ -518,10 +517,6 @@ setup_ports()
if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then
SST_PORT=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $2 }')
REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F ':' '{ print $1 }')
- REMOTEHOST=$(getent hosts $REMOTEIP | awk '{ print $2 }')
- if [[ -z $REMOTEHOST ]];then
- REMOTEHOST=$REMOTEIP
- fi
lsn=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $4 }')
sst_ver=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $5 }')
else