Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
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
certo
mariadb
Commits
e4e851c8
Commit
e4e851c8
authored
Feb 03, 2022
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for WSREP node address to be used on systems with multiple network interfaces
parent
085365b0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
Makefile
Makefile
+1
-0
mariadb
mariadb
+15
-0
wsrep-init
wsrep-init
+4
-0
No files found.
Makefile
View file @
e4e851c8
...
@@ -148,6 +148,7 @@ define MARIADB_CONFIG
...
@@ -148,6 +148,7 @@ define MARIADB_CONFIG
config
wsrep
'galera'
config
wsrep
'galera'
option
cluster_address
''
option
cluster_address
''
option
cluster_options
''
option
cluster_options
''
option
node_address
''
option
server_id
''
option
server_id
''
option
wsrep_gtid_domain_id
''
option
wsrep_gtid_domain_id
''
option
gtid_domain_id
''
option
gtid_domain_id
''
...
...
mariadb
View file @
e4e851c8
...
@@ -20,6 +20,7 @@ entry_execute_method_root_MySQL() {
...
@@ -20,6 +20,7 @@ entry_execute_method_root_MySQL() {
common_execute_method_param
"
$DMROOT
.MySQL.GaleraBootstrap"
"1"
""
"mysql_galera_bootstrap"
"xsd:boolean"
common_execute_method_param
"
$DMROOT
.MySQL.GaleraBootstrap"
"1"
""
"mysql_galera_bootstrap"
"xsd:boolean"
common_execute_method_param
"
$DMROOT
.MySQL.GaleraClusterAddress"
"1"
"mysql_get_cluster_address"
"mysql_set_cluster_address"
common_execute_method_param
"
$DMROOT
.MySQL.GaleraClusterAddress"
"1"
"mysql_get_cluster_address"
"mysql_set_cluster_address"
common_execute_method_param
"
$DMROOT
.MySQL.GaleraClusterOptions"
"1"
"mysql_get_cluster_options"
"mysql_set_cluster_options"
common_execute_method_param
"
$DMROOT
.MySQL.GaleraClusterOptions"
"1"
"mysql_get_cluster_options"
"mysql_set_cluster_options"
common_execute_method_param
"
$DMROOT
.MySQL.GaleraNodeAddress"
"1"
"mysql_get_node_address"
"mysql_set_node_address"
common_execute_method_param
"
$DMROOT
.MySQL.ServerID"
"1"
"mysql_get_server_id"
"mysql_set_server_id"
common_execute_method_param
"
$DMROOT
.MySQL.ServerID"
"1"
"mysql_get_server_id"
"mysql_set_server_id"
common_execute_method_param
"
$DMROOT
.MySQL.WSREPGTIDdomainID"
"1"
"mysql_get_wsrep_gtid_domain_id"
"mysql_set_wsrep_gtid_domain_id"
common_execute_method_param
"
$DMROOT
.MySQL.WSREPGTIDdomainID"
"1"
"mysql_get_wsrep_gtid_domain_id"
"mysql_set_wsrep_gtid_domain_id"
common_execute_method_param
"
$DMROOT
.MySQL.GTIDdomainID"
"1"
"mysql_get_gtid_domain_id"
"mysql_set_gtid_domain_id"
common_execute_method_param
"
$DMROOT
.MySQL.GTIDdomainID"
"1"
"mysql_get_gtid_domain_id"
"mysql_set_gtid_domain_id"
...
@@ -102,6 +103,20 @@ mysql_set_cluster_options() {
...
@@ -102,6 +103,20 @@ mysql_set_cluster_options() {
fi
fi
}
}
mysql_get_node_address
()
{
echo
`
$UCI_GET
mariadb.galera.node_address
`
}
mysql_set_node_address
()
{
local
address
=
`
$UCI_GET
mariadb.galera.node_address
`
if
[
"
$address
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.galera.node_address
=
"
$1
"
$UCI_COMMIT
wsrep-init
systemctl restart mariadb
fi
}
mysql_get_server_id
()
{
mysql_get_server_id
()
{
echo
`
$UCI_GET
mariadb.galera.server_id
`
echo
`
$UCI_GET
mariadb.galera.server_id
`
}
}
...
...
wsrep-init
View file @
e4e851c8
...
@@ -4,6 +4,7 @@ UCI_GET="/sbin/uci -q get"
...
@@ -4,6 +4,7 @@ UCI_GET="/sbin/uci -q get"
ADDRESS
=
`
$UCI_GET
mariadb.galera.cluster_address
`
ADDRESS
=
`
$UCI_GET
mariadb.galera.cluster_address
`
OPTIONS
=
`
$UCI_GET
mariadb.galera.cluster_options
`
OPTIONS
=
`
$UCI_GET
mariadb.galera.cluster_options
`
NODE
=
`
$UCI_GET
mariadb.galera.node_address
`
SERVER_ID
=
`
$UCI_GET
mariadb.galera.server_id
`
SERVER_ID
=
`
$UCI_GET
mariadb.galera.server_id
`
WSREP_GTID
=
`
$UCI_GET
mariadb.galera.wsrep_gtid_domain_id
`
WSREP_GTID
=
`
$UCI_GET
mariadb.galera.wsrep_gtid_domain_id
`
GTID
=
`
$UCI_GET
mariadb.galera.gtid_domain_id
`
GTID
=
`
$UCI_GET
mariadb.galera.gtid_domain_id
`
...
@@ -20,6 +21,9 @@ EOF
...
@@ -20,6 +21,9 @@ EOF
if
[
!
-z
"
$OPTIONS
"
]
;
then
if
[
!
-z
"
$OPTIONS
"
]
;
then
echo
"wsrep_provider_options =
$OPTIONS
"
>>
/run/mysqld/wsrep.conf
echo
"wsrep_provider_options =
$OPTIONS
"
>>
/run/mysqld/wsrep.conf
fi
fi
if
[
!
-z
"
$NODE
"
]
;
then
echo
"wsrep_node_address =
$NODE
"
>>
/run/mysqld/wsrep.conf
fi
if
[
!
-z
"
$SERVER_ID
"
]
;
then
if
[
!
-z
"
$SERVER_ID
"
]
;
then
echo
"server_id =
$SERVER_ID
"
>>
/run/mysqld/wsrep.conf
echo
"server_id =
$SERVER_ID
"
>>
/run/mysqld/wsrep.conf
fi
fi
...
...
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