Skip to content

Commit 312de43

Browse files
authored
Merge pull request #786 from codership/10.1-MDEV-14612
MDEV-14612 wsrep_sst_mariabackup unnecessarily converts address to host name
2 parents e08ddcc + 15c6d6a commit 312de43

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

scripts/wsrep_sst_mariabackup.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ ssystag=""
3333
XTRABACKUP_PID=""
3434
SST_PORT=""
3535
REMOTEIP=""
36-
REMOTEHOST=""
3736
tcert=""
3837
tpem=""
3938
tkey=""
@@ -225,7 +224,7 @@ get_transfer()
225224
tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${tpem},cafile=${tcert}${sockopt} stdio"
226225
else
227226
wsrep_log_info "Encrypting with cert=${tpem}, cafile=${tcert}"
228-
tcmd="socat -u stdio openssl-connect:${REMOTEHOST}:${TSST_PORT},cert=${tpem},cafile=${tcert}${sockopt}"
227+
tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tpem},cafile=${tcert}${sockopt}"
229228
fi
230229
elif [[ $encrypt -eq 3 ]];then
231230
wsrep_log_info "Using openssl based encryption with socat: with key and crt"
@@ -248,7 +247,7 @@ get_transfer()
248247
tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tpem},key=${tkey},verify=0${sockopt}"
249248
else
250249
wsrep_log_info "Encrypting with cert=${tpem}, key=${tkey}, cafile=${tcert}"
251-
tcmd="socat -u stdio openssl-connect:${REMOTEHOST}:${TSST_PORT},cert=${tpem},key=${tkey},cafile=${tcert}${sockopt}"
250+
tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tpem},key=${tkey},cafile=${tcert}${sockopt}"
252251
fi
253252
fi
254253

@@ -518,10 +517,6 @@ setup_ports()
518517
if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then
519518
SST_PORT=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $2 }')
520519
REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F ':' '{ print $1 }')
521-
REMOTEHOST=$(getent hosts $REMOTEIP | awk '{ print $2 }')
522-
if [[ -z $REMOTEHOST ]];then
523-
REMOTEHOST=$REMOTEIP
524-
fi
525520
lsn=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $4 }')
526521
sst_ver=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $5 }')
527522
else

0 commit comments

Comments
 (0)