MariaDB fails to start when using galera cluster on 20.04 LTS

Bug #1884780 reported by Justin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mariadb-10.3 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu Release
Description: Ubuntu 20.04 LTS
Release: 20.04

Package Version
mariadb-server-10.3:
  Installed: 1:10.3.22-1ubuntu1
  Candidate: 1:10.3.22-1ubuntu1
  Version table:
 *** 1:10.3.22-1ubuntu1 500
        500 http://ap-southeast-2.ec2.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

When using galera with MariaDB, MariaDB fails to start with the following error:

mariadb.service - MariaDB 10.3.22 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2020-06-23 13:19:06 UTC; 9s ago
       Docs: man:mysqld(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 1143 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 1155 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 1157 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-envir>

Jun 23 13:19:06 hostname systemd[1]: Starting MariaDB 10.3.22 database server...
Jun 23 13:19:06 hostname sh[1158]: /usr/bin/galera_recovery: 71: cannot create /tmp/wsrep_recovery.xBNq83: Permission denied
Jun 23 13:19:06 hostname systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
Jun 23 13:19:06 hostname systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jun 23 13:19:06 hostname systemd[1]: Failed to start MariaDB 10.3.22 database server.

This appears to be happening because 20.04 LTS has "fs.protected_regular = 1" by default and "galera_recovery" in MariaDB 10.3 doesn't support this. It has been fixed upstream in MariaDB 10.5 (https://github.com/MariaDB/server/pull/1417/files) but hasn't been backported to 10.3.22.

Applying the fix to /usr/bin/galera_recovery fixes the issue.

J

Revision history for this message
Faustin (fauust) wrote :

Hi Justin!
Thanks a lot for your detailed report.

This should be fixed in 10.3.23 that is already available on official MariaDB repository:
https://jira.mariadb.org/browse/MDEV-21140

So another workaround is to install MariaDB from MariaDB Foundation repo:
https://downloads.mariadb.org/mariadb/repositories/#distro=Ubuntu&distro_release=focal--ubuntu_focal&mirror=host-europe&version=10.3

Regards,
Faustin

Revision history for this message
Faustin (fauust) wrote :
Changed in mariadb-10.3 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Justin (justin-rf) wrote :

Thanks! Any idea when 10.3.23 will make it to Ubuntu 20.04?

Revision history for this message
Otto Kekäläinen (otto) wrote :
Revision history for this message
Otto Kekäläinen (otto) wrote :

This bug was fixed in the package mariadb-10.3 - 1:10.3.25-0ubuntu0.20.04.1

---------------
mariadb-10.3 (1:10.3.25-0ubuntu0.20.04.1) focal-security; urgency=medium

  * SECURITY UPDATE: New upstream version 10.3.25 includes fixes for the
    following security vulnerabilities (LP: #1899500):
    - CVE-2020-15180
  * Includes previous upstream version 10.3.23 which has the fixes for
    the following security vulnerabilities:
    - CVE-2020-13249
    - CVE-2020-2814
    - CVE-2020-2812
    - CVE-2020-2760
    - CVE-2020-2752
  * Includes subquery optimizer fix done in upstream MDEV-21614 (LP: #1894855)
  * Includes Galera startup fix done in upstream MDEV-21140 (LP: #1884780)
  * Adapt mariadb.pc location to upstream change
  * Update libmariadb symbols for upstream release 3.1.8
  * Remove salsa-ci.yml, does not work for Ubuntu quality assurance

 -- Otto Kekäläinen <email address hidden> Mon, 12 Oct 2020 20:14:50 +0300

Changed in mariadb-10.3 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.