[MDEV-21363] RPM's postin script only starts and enables systemd service if migrated-from-my.cnf-settings.conf does not already exist Created: 2019-12-19 Updated: 2021-03-29 Resolved: 2021-03-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Scripts & Clients |
| Affects Version/s: | 10.2.29, 10.1.43, 10.3.20, 10.4.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Alexey Bychko (Inactive) |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | rpm, systemd | ||
| Issue Links: |
|
||||||||
| Description |
|
The postin script used by our RPM packages only starts and enables the systemd service if migrated-from-my.cnf-settings.conf does not exist. See this block of code:
https://github.com/MariaDB/server/blob/mariadb-10.1.43/support-files/rpm/server-postin.sh#L1 I don't think systemctl start mariadb and systemctl enable mariadb should be dependent on whether migrated-from-my.cnf-settings.conf exists or not. I think these commands should be executed on all systemd systems during installations. |
| Comments |
| Comment by Alexey Bychko (Inactive) [ 2021-03-25 ] |
|
there is a broken logic with restart, yes, but anyway postinstall script must not unconditionally enable systemd unit. |
| Comment by Alexey Bychko (Inactive) [ 2021-03-29 ] |
|
GeoffMontee systemd has platform policies describing required and optional services. by default all installed systemd unit files should stay in disabled state after installation and must not be started unless unit is listed in platform policy as requred. this is implemented in systemctl preset https://github.com/MariaDB/server/blob/4e99e67c4e8a04bd03cb0e7efc2ce0129af60c34/support-files/rpm/server-postin.sh#L20 so, everything is fine already and it works as expected. not a bug, because it's admin's work to enable/disable the services on server. |