Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
11.8
-
None
-
None
-
Can result in unexpected behaviour
Description
The generated mysql.service file has the absolute path for the wsrep-start-position file hardcoded, and it turns out that path is hard coded to be the same as the default socket path (of all things).
This works out ok when moving/removing /var/lib/mysql on Debian based distributions where the socket file is located under /run, but on RPM distros it is hardcoded to /var/lib/mysql/wsrep_start_position; and so service startup breaks when removing the default datadir.
Even worse: it even fails on standalone servers that do not actually use Galera / wsrep at all.
Suggested fix:
- add RuntimeDirectory=mariadb to the service file
- use /run/mariadb/wsrep_start_position path everywhere
That way SystemD will take care of creating the directory under /run on service startup, and remove it again on service shutdown, so that it will always be present when needed
Attachments
Issue Links
- is caused by
-
MDEV-19210 use environment file in systemd units for _WSREP_*
-
- Closed
-