[MDEV-15718] Issue upgrading on Debian stretch from 10.1 to 10.2 Created: 2018-03-29  Updated: 2022-06-14  Resolved: 2022-06-14

Status: Closed
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: 10.2.14
Fix Version/s: 10.2.44

Type: Bug Priority: Major
Reporter: Matthieu Roisil Assignee: Otto Kekäläinen
Resolution: Fixed Votes: 0
Labels: packaging
Environment:

Debian 9.4 (stretch)


Issue Links:
Duplicate
duplicates MDEV-19822 MariaDB 10.4 install fails on Ubuntu ... Closed

 Description   

Hi,

Following the upgrade guidelines (https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102/), I hit this issue when upgrading from 10.1 to 10.2 on Debian 9.4 :

Preparing to unpack .../mariadb-server-10.2_10.2.14+maria~stretch_amd64.deb ...
/var/lib/mysql: found previous version 10.1
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d returned 5
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.2_10.2.14+maria~stretch_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Selecting previously unselected package mariadb-client.
Preparing to unpack .../mariadb-client_10.2.14+maria~stretch_all.deb ...
Unpacking mariadb-client (10.2.14+maria~stretch) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../mariadb-server_10.2.14+maria~stretch_all.deb ...
Unpacking mariadb-server (10.2.14+maria~stretch) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-10.2_10.2.14+maria~stretch_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Debian dpkg preinst checks if mysql is running using pgrep mariadb-server-10.2.preinst but in my case I'm using prometheus/mysqld_exporter and the actual pgrep match it too.

So I suggest using "pgrep -x mysqld" instead of "pgrep mysql"

Regards,

Puckel_



 Comments   
Comment by Tuukka Pasanen [ 2022-03-21 ]

Is this still problem as Debian 9 is getting out of Maintenance

Comment by Faustin Lammler [ 2022-03-25 ]

Seems to be a duplicate of MDEV-19822 that was solved with https://github.com/MariaDB/server/commit/c9f0f88838f895dce7b9596ba298fb8116c4fd2c.

This was not backported to 10.2 though, serg should we?

Comment by Faustin Lammler [ 2022-03-25 ]

See last comment

Comment by Sergei Golubchik [ 2022-03-25 ]

sure, why not?

Comment by Faustin Lammler [ 2022-03-25 ]

serg 10.3 seems to be missing it too, what is the best way to integrate it on both? 2 PR's?

Comment by Faustin Lammler [ 2022-03-25 ]

PR created https://github.com/MariaDB/server/pull/2068, it should go to 10.3+ as explained by Anel.

Comment by Tuukka Pasanen [ 2022-03-29 ]

I don't see any problems with this PR?

Comment by Anel Husakovic [ 2022-03-30 ]

serg, otto, I think that fix for https://github.com/MariaDB/server/commit/fb7c1b9415c9a8b0dc2e86ae44f0e7a2634e5d7e is wrong and as a proof, I created the test script how PID namespace works and result.
I suggested proper solution how to find right PID of host pidnamespace in PR https://github.com/MariaDB/server/pull/2076.
I have tested on Ubuntu bionic (as said couldn't find a problem), but is visible with Debian.
Can you please review?

Comment by Anel Husakovic [ 2022-05-04 ]

This should be fixed with https://github.com/MariaDB/server/commit/794bebf9ee18de4138c4d2c93853d49ff3af7f12

Comment by Anel Husakovic [ 2022-06-14 ]

Fixed with https://github.com/MariaDB/server/commit/794bebf9ee18de4138c4d2c93853d49ff3af7f12

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