[MDEV-23931] Upgrade from 10.3 to 10.4 did not install sysv init script Created: 2020-10-09  Updated: 2021-07-27  Resolved: 2021-07-27

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform Debian
Affects Version/s: 10.4
Fix Version/s: N/A

Type: Bug Priority: Blocker
Reporter: Leon T Assignee: Otto Kekäläinen
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

Debian Buster



 Description   

This happened to be when upgrading from 10.3 to 10.4, but I suspect other versions are affected. I use sysv-rc to launch daemons/servers . I was forced to install systemd for the sake of php which makes use of systemd-tmpfiles command. But I otherwise do not use systemd at all. I think since this got installed, mariadb's installer assumed I use systemd for init. Therefore it failed to add the mysql.init script to /etc/init.d/ . This means mysql won't start now. I was able to manually yank mysql.init from the source and that works fine, but I hate to have to manually do this everytime I update (what if you guys make changes to the init script for example).

I think your installer script needs to be a little more thorough about checking that systemd is being used for init.

For example:

$ systemctl
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
$ echo $?
1



 Comments   
Comment by Sergei Golubchik [ 2021-06-05 ]

mysql.init was removed in the commit a4cc6fb91f in 10.4 and was added back in commit 764dd39ca7, but, for some reason, only in 10.5.

otto, would you want us to backport your fix to 10.4 or is the answer "please, upgrade to 10.5" ?

leon, note that in 10.4 mysql.init is still installed, in /usr/share/mysql, so as long as you are copying it manually, it's best to copy it from there. Or, perhaps, you can symlink it, then it'll work over upgrades too.

Comment by Otto Kekäläinen [ 2021-06-06 ]

serg Here you have https://github.com/MariaDB/server/pull/1850

Comment by Otto Kekäläinen [ 2021-06-07 ]

Unfortunately 10.4 has a bunch of other issues and work on this seems this went down a rabbit hole and maybe not worth completing. It is difficult to prove this change would not introduce regressions anywhere.

If somebody upgraded from 10.3 to 10.4 and ran into this issue, maybe the best thing after all is simply to recommend to upgrade to 10.5. Why stop on 10.4? If you upgrade from 10.3, go all the way to the latest stable, 10.5.

Generated at Thu Feb 08 09:26:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.