[MDEV-11045] RPM should execute systemctl daemon-reload after update Created: 2016-10-13 Updated: 2019-05-13 Resolved: 2019-05-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Platform RedHat |
| Affects Version/s: | 10.1.17, 10.1.18 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Jonathan Gazeley | Assignee: | Sergei Golubchik |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | contribution, foundation, init, need_feedback, packaging, patch, systemd | ||
| Environment: |
CentOS 7 |
||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 10.1.30 | ||||||||||||||||
| Description |
|
The RPM for RHEL7 (and other distros that use systemd) should execute systemctl daemon-reload after updating the RPM, to prevent this error message: Warning: mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units. This should occur in the %post-install section, otherwise changes to the systemd unit will not get picked up until a manual intervention is made. Not sure if related, but after updating the RPM, systemd seems to lose control of the running daemon, but I'll log this as a separate issue. |
| Comments |
| Comment by Daniel Black [ 2017-12-18 ] | ||||
|
https://src.fedoraproject.org/rpms/mariadb/blob/master/f/mariadb.spec#_1212
Unsure of portability. | ||||
| Comment by Daniel Black [ 2018-02-03 ] | ||||
|
Looks like this was added in The %systemd_post macro is quite different using presets however https://github.com/systemd/systemd/blob/master/src/core/macros.systemd.in#L51..L56 | ||||
| Comment by Jonathan Gazeley [ 2018-02-03 ] | ||||
|
Can confirm that systemctl is in /usr/bin on CentOS 7
| ||||
| Comment by Daniel Black [ 2018-02-04 ] | ||||
|
Thanks jgazeley, created https://github.com/MariaDB/server/pull/592 to fix this though I suspect the main factor, daemon-reload required, was fixed in systemd rpm macros while back. If this is wrong I'm happy to be corrected however I didn't see any special handling of daemon-reload in the fedora spec https://src.fedoraproject.org/rpms/mariadb/blob/master/f/mariadb.spec on which I based a lot of these changes. This might address some of the most annoying aspects of Feedback welcome. | ||||
| Comment by Sergey Vojtovich [ 2018-03-13 ] | ||||
|
Overdue PR. | ||||
| Comment by Sergei Golubchik [ 2019-03-22 ] | ||||
|
as far as I can see, post-install scriptlet was running systemctl daemon-reload since 2015. Is it not enough? |