[MDEV-20676] systemd script not working Created: 2019-09-26 Updated: 2020-08-25 Resolved: 2020-05-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform RedHat |
| Affects Version/s: | 10.4.7, 10.4.10 |
| Fix Version/s: | 10.1.45, 10.2.32, 10.3.23, 10.4.13 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Benjamin Kurschies | Assignee: | Julius Goryavsky |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | systemd | ||
| Environment: |
3 Node Galera Cluster - MariaDB 10.4.7 Enterprise on RHEL 7.6 |
||
| Description |
|
when trying to start mariadb via systemctl, I'm getting this error:
seems that the binary "galera-recovery" is neither searching the mysqld in the same folder as the binary itself nor in the path variable but instead expects the root to be /usr/local/mysql Workaround: I just modified line 77 of "mariadb.service":
|
| Comments |
| Comment by Geoff Montee (Inactive) [ 2019-12-06 ] | ||||||||||||||||||||||||
|
The galera_recovery script refers to mysqld through the path defined by @sbindir@, which is expanded at compile time:
https://github.com/MariaDB/server/blob/mariadb-10.1.43/scripts/galera_recovery.sh#L71 The primary systemd unit file also refers to mysqld through the path defined by @sbindir@:
https://github.com/MariaDB/server/blob/mariadb-10.1.43/support-files/mariadb.service.in#L84 I'm not sure why the path causes issues in the galera_recovery script, but the same path apparently does not cause issues in the systemd unit file. | ||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-12-06 ] | ||||||||||||||||||||||||
|
I downloaded a binary tarball, and it does look like @sbindir@ is being expanded to different paths when you compare the galera_recovery script and the mariadb.service unit file. galera_recovery:
mariadb.service:
This difference in behavior seems to occur because the scripts/ directory has special CMake rules that change the paths for "standalone" installations:
https://github.com/MariaDB/server/blob/mariadb-10.1.43/scripts/CMakeLists.txt#L204 | ||||||||||||||||||||||||
| Comment by Julius Goryavsky [ 2020-03-31 ] | ||||||||||||||||||||||||
|
Fixed, https://github.com/MariaDB/server/commit/cbf00b625a831a306fcfa450b76f580d962c75db | ||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2020-04-01 ] | ||||||||||||||||||||||||
|
ok to push | ||||||||||||||||||||||||
| Comment by Julius Goryavsky [ 2020-05-12 ] | ||||||||||||||||||||||||
|
Fix here: https://github.com/MariaDB/server/commit/cbf00b625a831a306fcfa450b76f580d962c75db | ||||||||||||||||||||||||
| Comment by Valerii Kravchuk [ 2020-05-12 ] | ||||||||||||||||||||||||
|
The bug was reported in 10.4.x, but Fix Version(s lists only 10.1.44. What exact 10.4.x version the fix is going into? | ||||||||||||||||||||||||
| Comment by Julius Goryavsky [ 2020-05-15 ] | ||||||||||||||||||||||||
|
Corrected by adding the version number (10.4.13) to fix versions. Fixed for all branches starting from 10.1. Next, the patch was merged from 10.1 to all the main branches, sequentially, including 10.4: https://github.com/MariaDB/server/commit/c8e0c524af83149e77c88e9a6fd763221dea9277 | ||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2020-05-15 ] | ||||||||||||||||||||||||
|
Hi sysprg,
So shouldn't "Fix Version(s)" also mention 10.2.32 and MariaDB 10.3.23? Also, GitHub says that the commit that you linked is in MariaDB 10.1.45, but "Fix Version(s)" for this bug lists MariaDB 10.1.44. Is it also incorrect to have "MariaDB 10.1.44" in "Fix Version(s)" then? I took a look at the source code, and it does look to me like MariaDB 10.1.44 still has the bug, while MariaDB 10.1.45 has the fix: https://github.com/MariaDB/server/blob/mariadb-10.1.44/support-files/mariadb.service.in#L73 https://github.com/MariaDB/server/blob/mariadb-10.1.45/support-files/mariadb.service.in#L73 So the "Fix Version(s)" field for this bug should actually be "MariaDB 10.1.45, 10.2.32, MariaDB 10.3.23, MariaDB 10.4.13" and "MariaDB 10.1.44" should be completely removed from the field, right? | ||||||||||||||||||||||||
| Comment by Julius Goryavsky [ 2020-05-18 ] | ||||||||||||||||||||||||
|
GeoffMontee Thanks for the clarification, I corrected the list of versions - indeed, the correction is relevant only from 10.1.45 and it was necessary to specify other versions |