[MDEV-17739] mariadb-server-10.1: Updates not restarting mariadb@xx services Created: 2018-11-16  Updated: 2023-11-24

Status: Open
Project: MariaDB Server
Component/s: Packaging, Platform Debian
Affects Version/s: 10.1.36
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Mitesh Shah Assignee: Tuukka Pasanen
Resolution: Unresolved Votes: 0
Labels: systemd
Environment:

Ubuntu 18.04 LTS


Issue Links:
Relates
relates to MDEV-23321 debian upgrade shouldn't start previo... Open

 Description   

Dear Maintainer,

We had installed and running Multi-instance version of mariadb.

Today when i fire `apt-get dist-upgrade` command mariadb update failed.

The following packages will be upgraded:
  mariadb-server-10.1
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/7230 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 156043 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.1_1%3a10.1.37+maria-1~bionic_amd64.deb ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: warning: old mariadb-server-10.1 package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.1_1%3a10.1.37+maria-1~bionic_amd64.deb (--unpack):
 new mariadb-server-10.1 package pre-removal script subprocess returned error exit status 1
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-10.1_1%3a10.1.37+maria-1~bionic_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

When using MariaDB multiple instances the upgrade process shows errors stopping/starting mysql and the servers are not restarted. Would be great if the upgrade scripts could detect running mariadb@xxx services (`systemctl | grep mariadb`??) and stop/restart them, instead of assuming a single mariadb service.


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