Upgrade issue from community 5.6 to PS 5.6 on Debian9

Bug #1711734 reported by Yves Trudeau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

If you first install MySQL Community 5.6 on Debian 9 and then install PS 5.6, MySQL community keeps the mysql.service in a "masked" state which causes PS 5.6 to fail to start.

root@debian:/etc/init.d# bash -x /etc/init.d/mysql start
+ set -e
+ set -u
+ PERCONA_PREFIX=/usr
+ test -x /usr/sbin/mysqld
+ startup_timeout=900
+ stop_timeout=300
+ '[' -e /etc/default/mysql ']'
+ . /etc/default/mysql
++ startup_timeout=900
++ stop_timeout=300
+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ prog=mysql
+++ service=mysql.service
++++ systemctl -p LoadState --value show mysql.service
+++ state=masked
+++ '[' masked = masked ']'
+++ exit 0

root@debian:/etc/init.d# systemctl -p LoadState --value show mysql.service
masked

The fix is simply to unmask:

root@debian:/etc/init.d# systemctl unmask mysql.service
Removed /etc/systemd/system/mysql.service.
root@debian:/etc/init.d# ./mysql start
[ ok ] Starting mysql (via systemctl): mysql.service.

Originally I had installed:

root@debian:/etc/init.d# cat /home/debian/mysql.deb.installed
ii mysql-apt-config 0.8.7-1 all Auto configuration for MySQL APT Repo.
ii mysql-client 5.6.37-1debian9 amd64 MySQL Client meta package depending on latest version
ii mysql-common 5.8+1.0.2 all MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-community-client 5.6.37-1debian9 amd64 MySQL Client
ii mysql-community-server 5.6.37-1debian9 amd64 MySQL Server

then I installed PS 5.6:

root@debian:/etc/init.d# dpkg -l | grep percona
ii libperconaserverclient18.1 5.6.36-82.1-1.stretch amd64 Percona Server database client library
ii percona-release 0.1-4.stretch all Package to install Percona gpg key and APT repo
ii percona-server-client-5.6 5.6.36-82.1-1.stretch amd64 Percona Server database client binaries
ii percona-server-common-5.6 5.6.36-82.1-1.stretch amd64 Percona Server database common files (e.g. /etc/mysql/my.cnf)
ii percona-server-server-5.6 5.6.36-82.1-1.stretch amd64 Percona Server database server binaries

I suggest the install script checks for the existence of a masked mysql.service entry and deal with it appropriately.

Tags: pkg
tags: added: pkg
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3733

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.