server
server copied to clipboard
MDEV-19210: use environment file in systemd units
- [x] The Jira issue number for this PR is: MDEV-10210
Description
We used to run systemctl set-environment
to pass _WSREP_START_POSITION
. This is bad because:
- it clutter
systemd
's environment (yes, pid 1) - it requires root privileges
- options (like
LimitNOFILE=
) are not applied
Let's just create an environment file in ExecStartPre=
, that is read before ExecStart=
kicks in. We have _WSREP_START_POSITION
around for the main process without any downsides.
How can this PR be tested?
Well, good question... This should not add new regressions and continue as expected.
Special care is to be taken for Debian, which adds extra commands to the systemd service file.
Basing the PR against the correct MariaDB version
- [ ] This is a new feature and the PR is based against the latest MariaDB development branch.
- [x] This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced.
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.