Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a15ab358
Commit
a15ab358
authored
Mar 20, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsrep_sst scripts: support traditional netcat
parent
89b0d5cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
7 deletions
+48
-7
scripts/wsrep_sst_mariabackup.sh
scripts/wsrep_sst_mariabackup.sh
+16
-2
scripts/wsrep_sst_xtrabackup-v2.sh
scripts/wsrep_sst_xtrabackup-v2.sh
+16
-3
scripts/wsrep_sst_xtrabackup.sh
scripts/wsrep_sst_xtrabackup.sh
+16
-2
No files found.
scripts/wsrep_sst_mariabackup.sh
View file @
a15ab358
...
...
@@ -179,12 +179,26 @@ get_transfer()
wsrep_log_info
"Using netcat as streamer"
if
[[
"
$WSREP_SST_OPT_ROLE
"
==
"joiner"
]]
;
then
if
nc
-h
2>&1 |
grep
-q
ncat
;
then
# Ncat
tcmd
=
"nc -l
${
TSST_PORT
}
"
else
elif
nc
-h
2>&1 |
grep
-q
--
'-d\>'
;
then
# Debian netcat
tcmd
=
"nc -dl
${
TSST_PORT
}
"
else
# traditional netcat
tcmd
=
"nc -l -p
${
TSST_PORT
}
"
fi
else
tcmd
=
"nc
${
REMOTEIP
}
${
TSST_PORT
}
"
if
nc
-h
2>&1 |
grep
-q
ncat
;
then
# Ncat
tcmd
=
"nc
${
REMOTEIP
}
${
TSST_PORT
}
"
elif
nc
-h
2>&1 |
grep
-q
--
'-d\>'
;
then
# Debian netcat
tcmd
=
"nc
${
REMOTEIP
}
${
TSST_PORT
}
"
else
# traditional netcat
tcmd
=
"nc -q0
${
REMOTEIP
}
${
TSST_PORT
}
"
fi
fi
else
tfmt
=
'socat'
...
...
scripts/wsrep_sst_xtrabackup-v2.sh
View file @
a15ab358
...
...
@@ -268,13 +268,26 @@ get_transfer()
wsrep_log_info
"Using netcat as streamer"
if
[[
"
$WSREP_SST_OPT_ROLE
"
==
"joiner"
]]
;
then
if
nc
-h
2>&1 |
grep
-q
ncat
;
then
# Ncat
tcmd
=
"nc
$sockopt
-l
${
TSST_PORT
}
"
else
elif
nc
-h
2>&1 |
grep
-q
--
'-d\>'
;
then
# Debian netcat
tcmd
=
"nc
$sockopt
-dl
${
TSST_PORT
}
"
else
# traditional netcat
tcmd
=
"nc
$sockopt
-l -p
${
TSST_PORT
}
"
fi
else
# netcat doesn't understand [] around IPv6 address
tcmd
=
"nc
${
WSREP_SST_OPT_HOST_UNESCAPED
}
${
TSST_PORT
}
"
if
nc
-h
2>&1 |
grep
-q
ncat
;
then
# Ncat
tcmd
=
"nc
${
WSREP_SST_OPT_HOST_UNESCAPED
}
${
TSST_PORT
}
"
elif
nc
-h
2>&1 |
grep
-q
--
'-d\>'
;
then
# Debian netcat
tcmd
=
"nc
${
WSREP_SST_OPT_HOST_UNESCAPED
}
${
TSST_PORT
}
"
else
# traditional netcat
tcmd
=
"nc -q0
${
WSREP_SST_OPT_HOST_UNESCAPED
}
${
TSST_PORT
}
"
fi
fi
else
tfmt
=
'socat'
...
...
scripts/wsrep_sst_xtrabackup.sh
View file @
a15ab358
...
...
@@ -144,12 +144,26 @@ get_transfer()
wsrep_log_info
"Using netcat as streamer"
if
[[
"
$WSREP_SST_OPT_ROLE
"
==
"joiner"
]]
;
then
if
nc
-h
2>&1 |
grep
-q
ncat
;
then
# Ncat
tcmd
=
"nc -l
${
TSST_PORT
}
"
else
elif
nc
-h
2>&1 |
grep
-q
--
'-d\>'
;
then
# Debian netcat
tcmd
=
"nc -dl
${
TSST_PORT
}
"
else
# traditional netcat
tcmd
=
"nc -l -p
${
TSST_PORT
}
"
fi
else
tcmd
=
"nc
${
WSREP_SST_OPT_HOST_UNESCAPED
}
${
TSST_PORT
}
"
if
nc
-h
2>&1 |
grep
-q
ncat
;
then
# Ncat
tcmd
=
"nc
${
REMOTEIP
}
${
TSST_PORT
}
"
elif
nc
-h
2>&1 |
grep
-q
--
'-d\>'
;
then
# Debian netcat
tcmd
=
"nc
${
REMOTEIP
}
${
TSST_PORT
}
"
else
# traditional netcat
tcmd
=
"nc -q0
${
REMOTEIP
}
${
TSST_PORT
}
"
fi
fi
else
tfmt
=
'socat'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment