[MDEV-19210] use environment file in systemd units for _WSREP_* Created: 2019-04-07 Updated: 2023-12-20 |
|
| Status: | In Testing |
| Project: | MariaDB Server |
| Component/s: | Configuration |
| Affects Version/s: | None |
| Fix Version/s: | 11.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Anel Husakovic | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | systemd | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
We used to run systemctl set-environment to pass _WSREP_START_POSITION. This is bad because:
The solution is: 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. |
| Comments |
| Comment by Geoff Montee (Inactive) [ 2019-09-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
According to a conversation between marko and danblack on Zulip, we may need to merge this pull request to improve our Galera testing with systemd. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Michael Widenius [ 2022-02-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please add a description of:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings [ 2023-08-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reverted this as it broke something in old buildbot. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2023-12-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Testing: From docker compose written to help this: Two test environments: - top level Almalinux. , deb directory, there's small bit of debian based tested.
General principle is that a shutdown of any galera node will be able to recover an IST, provided the data cache of the donor node contains all the changes, without a full SST.
Leave this as a running terminal Per docs this is first step in a cluster:
This shows it up as a primary.
Same with node3.
Test 1: shutdown a node. Add data to cluster, see if, how it recovers
Trigger start:
Observer form logs:
Observer the full rejoin of node3. Try same on node1 to ensure it wasn't special because it was the bootstrap node.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2023-12-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Debian. Because Debian configures mariadb to autostart on install is a little different. I also found I couldn't repeat it with the same reliability. Relying on packages may be required - Change to ./deb directory:
Start node1 only
Because of unknown reasons, I needed to revert back to container manager rather than podman to continue the following.
Important bit is at the bottom, the debian-start executes ok. This was the main difference in the PR from the Almalinux testing above.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2023-12-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
for testing - bb-11.4-pr2726-MDEV-19210-environment-file-pkgtest, same as pull request 2726. packages - https://ci.mariadb.org/41762/ |