[MDEV-21860] /etc/init.d/mysql still starts mysqld_safe and mysqld even when mariadb.service is disabled in systemd Created: 2020-03-03 Updated: 2020-03-03 Resolved: 2020-03-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Configuration |
| Affects Version/s: | 10.2.31 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Gernot Hassenpflug | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS7.7.1908 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
On systems running the latest CentOS7.7.1908 and MariaDB 10.2.31-1.el7.centos, disabling the MariaDB service with "systemctl disable mariadb" does not prevent the DB starting up again after booting, even though mariadb.service is disabled according to status. Behaviour seen: The /etc/init.d/mysql script starts up mysqld_safe and mysqld regardless (although using different, presumably default, configuration variables, e.g., for pid and err files). chkconfig is not in use, systemd is supposedly controlling the behaviour. Using "systemctl disable mysql" tries to redirect to chkconfig, but this does not achieve anything as the mysql service is not registered with chkconfig. The question is how to disable in systemd properly? And furthermore, how is it that disabling mariadb service does not stop the /etc/init.d/mysql script from running. Conditions where behaviour is seen: Now, this only affects servers upgraded to the latest CentOS and MariaDB where the MariaDB service was originally active. /var/log/messages shows systemd starting/stopping the service on bootup and shutdown (see attachment for logs). On servers upgraded from the previous Centos7.6.1810 and MariaDB 10.2.6-1.el7.centos where the service was already stopped with "systemctl disable mariadb", the service remains off as expected after the upgrade. There are no /var/log/messages mentioning mysql or MariaDB on such servers. I am assuming this is a regression of some kind, or a side-effect of some added feature between 10.2.6 and 10.2.31 or its systemd unit(s), but looking at the Changelogs does not raise any red flags for me. Explanatory Notes: The reason we disable MariaDB on a server is because we split the MariaDB service out of a combined application/DB server and place it in a separate server from the application server, in cases where the server load warrants it. |
| Comments |
| Comment by Gernot Hassenpflug [ 2020-03-03 ] |
|
Cancelling this. Sorry for the noise. Our development section contacted me to say the issue is not with MariaDB. Our local httpd service script has a required dependency on mysql, and this needs to be changed/removed for split servers. |
| Comment by Daniel Black [ 2020-03-03 ] |
|
Note that systemd reverts to sysv scripts on only exactly the same name so mariadb.service != /etc/init.d/mysql. Also systemd Aliases are very dodgy as are symlinks. So yes, make the httpd.service depend on mariadb.service directly rather than via other dubious means. |