Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mariadb
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
docker-library
mariadb
Commits
3fb9801b
Commit
3fb9801b
authored
Aug 31, 2023
by
Daniel Black
Browse files
Options
Downloads
Patches
Plain Diff
tests: galera SST
parent
c697a87d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.test/run.sh
+61
-1
61 additions, 1 deletion
.test/run.sh
with
61 additions
and
1 deletion
.test/run.sh
+
61
−
1
View file @
3fb9801b
...
@@ -53,7 +53,9 @@ fi
...
@@ -53,7 +53,9 @@ fi
runandwait
()
runandwait
()
{
{
local
port_int
local
port_int
if
[
-z
"
$cname
"
]
;
then
cname
=
"mariadbcontainer
$RANDOM
"
cname
=
"mariadbcontainer
$RANDOM
"
fi
if
[
-z
"
$port
"
]
;
then
if
[
-z
"
$port
"
]
;
then
cid
=
"
$(
cid
=
"
$(
docker run
-d
\
docker run
-d
\
...
@@ -193,6 +195,48 @@ checkReplication() {
...
@@ -193,6 +195,48 @@ checkReplication() {
fi
fi
}
}
galera_sst
()
{
sst
=
$1
netid
=
"mariadbnetwork
$RANDOM
"
docker network create
"
$netid
"
cname
=
"mariadbcontainer_donor
$RANDOM
"
donorname
=
$cname
runandwait
\
--network
"
$netid
"
\
--env
MARIADB_ROOT_PASSWORD
=
secret
--env
MARIADB_DATABASE
=
test
--env
MARIADB_USER
=
test
--env
MARIADB_PASSWORD
=
test
\
"
${
image
}
"
\
--wsrep-new-cluster
--wsrep-provider
=
/usr/lib/libgalera_smm.so
--wsrep_cluster_address
=
gcomm://
"
$cname
"
--binlog_format
=
ROW
--innodb_autoinc_lock_mode
=
2
--wsrep_on
=
ON
--wsrep_sst_method
=
"
$sst
"
--wsrep_sst_auth
=
root:secret
master_host
=
$cid
unset
cname
DOCKER_LIBRARY_START_TIMEOUT
=
$((
${
DOCKER_LIBRARY_START_TIMEOUT
:-
10
}
*
7
))
runandwait
\
--network
"
$netid
"
\
--env
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD
=
1
\
"
${
image
}
"
\
--wsrep-provider
=
/usr/lib/libgalera_smm.so
--wsrep_cluster_address
=
gcomm://
"
$donorname
"
--binlog_format
=
ROW
--innodb_autoinc_lock_mode
=
2
--wsrep_on
=
ON
--wsrep_sst_method
=
"
$sst
"
--wsrep_sst_auth
=
root:secret
v
=
$(
mariadbclient
-u
root
-psecret
-e
'select VARIABLE_VALUE from information_schema.GLOBAL_STATUS WHERE VARIABLE_NAME="WSREP_LOCAL_STATE"'
||
:
)
waiting
=
${
DOCKER_LIBRARY_START_TIMEOUT
:-
10
}
set
+e +o pipefail +x
while
[
"
$waiting
"
-gt
0
]
&&
[
"
$v
"
!=
4
]
do
((
waiting--
))
sleep
1
v
=
$(
mariadbclient
-u
root
-psecret
-e
'select VARIABLE_VALUE from information_schema.GLOBAL_STATUS WHERE VARIABLE_NAME="WSREP_LOCAL_STATE"'
||
:
)
done
set
-eo
pipefail
-x
if
[
"
$v
"
!=
4
]
then
docker logs
"
$donorcid
"
die
'timeout'
fi
killoff
}
case
${
2
:-
all
}
in
case
${
2
:-
all
}
in
all|required_password
)
all|required_password
)
...
@@ -791,6 +835,22 @@ zstd "${initdb}"/*zst*
...
@@ -791,6 +835,22 @@ zstd "${initdb}"/*zst*
killoff
killoff
rm -rf "
${
initdb
}
"
rm -rf "
${
initdb
}
"
;&
galera_mariadbbackup)
galera_sst mariabackup
;&
galera_sst_rsync)
galera_sst rsync
# TODO fix - failing to do the authentication correctly of wsrep_sst_auth - Access denied on mysql usage within SST script
#;&
#galera_sst_mariadbdump)
#
#galera_sst mysqldump
# Insert new tests above by copying the comments below
# Insert new tests above by copying the comments below
# ;&
# ;&
# THE_TEST_NAME)
# THE_TEST_NAME)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment