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
161ce045
Commit
161ce045
authored
Aug 08, 2023
by
Andrew Hutchings
Committed by
Andrew Hutchings
Aug 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "use environment file in systemd units for _WSREP_START_POSITION"
This reverts commit
6c405904
.
parent
48e6918c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
support-files/CMakeLists.txt
support-files/CMakeLists.txt
+0
-2
support-files/mariadb.service.in
support-files/mariadb.service.in
+6
-6
No files found.
support-files/CMakeLists.txt
View file @
161ce045
...
...
@@ -32,8 +32,6 @@ ELSE()
SET
(
MYSQLD_GROUP
"mysql"
)
SET
(
ini_file_extension
"cnf"
)
SET
(
HOSTNAME
"uname -n"
)
get_filename_component
(
MYSQL_UNIX_DIR
${
MYSQL_UNIX_ADDR
}
DIRECTORY
)
SET
(
mysqlunixdir
${
MYSQL_UNIX_DIR
}
)
ENDIF
()
# XXX: shouldn't we just have variables for all this stuff and centralise
...
...
support-files/mariadb.service.in
View file @
161ce045
...
...
@@ -70,20 +70,20 @@ ProtectSystem=full
# Prevent accessing /home, /root and /run/user
ProtectHome=true
#
Use an environment file to pass variable _WSREP_START_POSITION
EnvironmentFile=-@mysqlunixdir@/wsrep-start-position
#
Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true
@SYSTEMD_EXECSTARTPRE@
# Perform automatic wsrep recovery. When server is started without wsrep,
# galera_recovery simply returns an empty string. In any case, however,
# the script is not expected to return with a non-zero status.
# It is always safe to remove @mysqlunixdir@/wsrep-start-position
# environment file.
# It is always safe to unset _WSREP_START_POSITION environment variable.
# Do not panic if galera_recovery script is not available. (MDEV-10538)
ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
VAR=`cd @bindir@/..; @bindir@/galera_recovery`; [ $? -eq 0 ] \
&&
echo _WSREP_START_POSITION=$VAR > @mysqlunixdir@/wsrep-start-position
|| exit 1"
&&
systemctl set-environment _WSREP_START_POSITION=$VAR
|| exit 1"
# Needed to create system tables etc.
# ExecStartPre=@scriptdir@/mysql_install_db -u mysql
...
...
@@ -96,7 +96,7 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
ExecStart=@sbindir@/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
# Unset _WSREP_START_POSITION environment variable.
ExecStartPost=/bin/
rm -f @mysqlunixdir@/wsrep-start-position
ExecStartPost=/bin/
sh -c "systemctl unset-environment _WSREP_START_POSITION"
@SYSTEMD_EXECSTARTPOST@
...
...
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