Upgrading MariaDB 5.5 to 10.1.11 fails with RPM (MDEV-9584)

[MDEV-9797] After upgrade from Galera server does not get restarted automatically on CentOS, RHEL, Fedora, SUSE Created: 2016-03-27  Updated: 2020-04-22

Status: Open
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: N/A
Fix Version/s: 10.1

Type: Technical task Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-22329 Packages issues when upgrading Open
Relates
relates to MDEV-9766 Testing for MDEV-9584 (Relaxed rules ... Stalled
Sprint: 10.1.14

 Description   

On CentOS 5 (same on CentOS 6, RHEL 5):

# Install MariaDB-Galera-server, e.g. 10.0:
sudo yum install MariaDB-Galera-server MariaDB-client
...
# Start the server:
sudo /etc/init.d/mysql start
Starting MySQL..                                           [  OK  ]
mysql -uroot -e "select @@version, @@version_comment"
+-----------------------+--------------------------------------+
| @@version             | @@version_comment                    |
+-----------------------+--------------------------------------+
| 10.0.24-MariaDB-wsrep | MariaDB Server, wsrep_25.13.raf7f02e |
+-----------------------+--------------------------------------+

Then upgrade to the new MariaDB-server and MariaDB-client (from MDEV-9584), either via yum upgrade or via yum install.
The upgrade happens, new RPMs are installed, old ones are removed, it's all good:

MariaDB-server-10.1.13-1
MariaDB-common-10.0.24-1
MariaDB-client-10.1.13-1

But the server does not get started. From the log it looks like no attempt has been made, the old server shuts down normally, and that's it.
Manual (re)start works, new server starts.

On CentOS 7 it's slightly different, the old server keeps running.



 Comments   
Comment by Elena Stepanova [ 2016-03-27 ]

I've added a conditional workaround to the new upgrade tests, if it's ever gets fixed, I'll need to remove it (please assign back to me for that).

Comment by Elena Stepanova [ 2016-03-28 ]

Raising the priority, because on CentOS 7 the workaround does not work: since the server has already been installed, and scripts updated, it attempts to use systemctl to restart the server (even if we do it via /etc/init.d/mysql, it still redirects to systemctl). Systemctl does not see the old server as a running server, so it does not stop it, and further attempt to start the new one fails.

Comment by Elena Stepanova [ 2016-03-28 ]

It looks somewhat similar on Fedora, at least there is also an attempt to stop the server, it also does not stop, so it keeps running:

[buildbot@fedora23-amd64 ~]$ sudo grep -iE 'mysql|maria' /var/log/messages 
...
Mar 28 10:51:48 fedora23-amd64 systemd: Stopped MariaDB database server.
[buildbot@fedora23-amd64 ~]$ mysql -uroo -e "show status like 'uptime'"
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Uptime        | 1050  |
+---------------+-------+
[buildbot@fedora23-amd64 ~]$ date
Mon 28 Mar 11:05:34 GMT 2016

However, unlike CentOS 7, I can't see anywhere an attempt to start the new server. Manual restart also fails.

On Fedora, it only applies to dnf install <rpm file>, because upgrade from repo does not work (MDEV-9807).

Comment by Elena Stepanova [ 2016-03-28 ]

On SLES 11 (upon zypper install over previously installed Galera), the old server is shutdown, the new server is not running.

Comment by Elena Stepanova [ 2016-03-29 ]

On openSUSE 13 (upon zypper install over previously installed Galera)

(2/2) Installing: MariaDB-server-10.1.14-1 [\]
(2/2) Installing: MariaDB-server-10.1.14-1 [|]
(2/2) Installing: MariaDB-server-10.1.14-1 [done]
Additional rpm output:
Failed to issue method call: No such file or directory
 
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
 
redirecting to systemctl stop mysql.service
 
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

Further restart also does not help:

+ sudo /etc/init.d/mysql restart
redirecting to systemctl restart mysql.service
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.

Generated at Thu Feb 08 07:37:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.