Systemd issues with percona-xtradb-cluster-5.6 package

Bug #1583000 reported by Drew Kutcharian on 2016-05-18
278
This bug affects 6 people
Affects Status Importance Assigned to Milestone
percona-xtradb-cluster-5.6 (Ubuntu)
Status tracked in Cosmic
Xenial
Undecided
Unassigned
Artful
Undecided
Unassigned
Bionic
Undecided
Unassigned
Cosmic
Medium
Unassigned
percona-xtradb-cluster-5.7 (Ubuntu)
Status tracked in Cosmic
Xenial
Undecided
Unassigned
Artful
Undecided
Unassigned
Bionic
Undecided
Unassigned
Cosmic
Undecided
Unassigned

Bug Description

Seems like Systemd and Percona XtraDB Cluster don't like to play together in 16.04. There are multiple issues:

1. There is no way to "bootstrap-pxc" using systemctl and when I use "/etc/init.d/mysql bootstrap-pxc", then even though mysql is running, systemd doesn't think it is.
See https://www.percona.com/doc/percona-xtradb-cluster/5.6/manual/bootstrap.html for more info.

Demonstration:
root@sql1:~# ps ax | grep mysql
 1428 pts/0 S 0:00 /bin/sh /usr/bin/mysqld_safe --wsrep-new-cluster
 1902 pts/0 Sl 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/percona-xtradb-cluster --plugin-dir=/usr/lib/mysql/plugin --user=mysql --wsrep-provider=/usr/lib/libgalera_smm.so --wsrep-new-cluster --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --wsrep_start_position=de1c3153-1c83-11e6-94af-63e494c70dbe:6
 1997 pts/0 S+ 0:00 grep --color=auto mysql

root@sql1:~# /etc/init.d/mysql status
● mysql.service - LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

root@sql1:~# systemctl status mysql
● mysql.service - LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
root@sql1:~#

2. There is no way to gracefully kill this mysql process:

Demonstration:
root@sql1:~# /etc/init.d/mysql stop
[ ok ] Stopping mysql (via systemctl): mysql.service.

root@sql1:~# systemctl stop mysql

root@sql1:~# ps ax | grep mysql
 1428 pts/0 S 0:00 /bin/sh /usr/bin/mysqld_safe --wsrep-new-cluster
 1902 pts/0 Sl 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/percona-xtradb-cluster --plugin-dir=/usr/lib/mysql/plugin --user=mysql --wsrep-provider=/usr/lib/libgalera_smm.so --wsrep-new-cluster --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --wsrep_start_position=de1c3153-1c83-11e6-94af-63e494c70dbe:6
 2133 pts/0 S+ 0:00 grep --color=auto mysql

Environment: Ubuntu Server 16.04 LTS
I installed XtraDB Cluster using "apt-get -yq install percona-xtradb-cluster-server"

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in percona-xtradb-cluster-5.6 (Ubuntu):
status: New → Confirmed
James Page (james-page) on 2017-03-08
Changed in percona-xtradb-cluster-5.6 (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
engin (dumlu) on 2017-08-15
information type: Public → Public Security
Felipe Reyes (freyes) on 2018-06-12
Changed in percona-xtradb-cluster-5.7 (Ubuntu Xenial):
status: New → Invalid
Changed in percona-xtradb-cluster-5.7 (Ubuntu Artful):
status: New → Invalid
Changed in percona-xtradb-cluster-5.6 (Ubuntu Bionic):
status: New → Invalid
Changed in percona-xtradb-cluster-5.6 (Ubuntu Cosmic):
status: Triaged → Invalid
Felipe Reyes (freyes) on 2018-06-12
tags: added: sts
Changed in percona-xtradb-cluster-5.6 (Ubuntu Artful):
status: New → Confirmed
Changed in percona-xtradb-cluster-5.6 (Ubuntu Xenial):
status: New → Confirmed
Changed in percona-xtradb-cluster-5.7 (Ubuntu Bionic):
status: New → Confirmed
Changed in percona-xtradb-cluster-5.7 (Ubuntu):
status: New → Confirmed
Felipe Reyes (freyes) wrote :
Download full text (4.0 KiB)

using "systemctl start <email address hidden>" doesn't help here neither

root@pxc:~# systemctl stop mysql
root@pxc:~# systemctl status mysql
● mysql.service - Percona XtraDB Cluster daemon
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2018-06-12 22:19:46 UTC; 2s ago
  Process: 2025 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
 Main PID: 1505 (code=exited, status=0/SUCCESS)

Jun 12 22:06:36 pxc mysql[1467]: * Starting MySQL (Percona XtraDB Cluster) database server mysqld
Jun 12 22:06:36 pxc /etc/init.d/mysql[1504]: MySQL PID not found, pid_file detected/guessed: /var/run/mysqld/mysqld.pid
Jun 12 22:06:38 pxc mysql[1467]: ...done.
Jun 12 22:06:38 pxc systemd[1]: Started Percona XtraDB Cluster daemon.
Jun 12 22:06:38 pxc systemd[1]: mysql.service: Failed to reset devices.list: Operation not permitted
Jun 12 22:19:31 pxc systemd[1]: Stopping Percona XtraDB Cluster daemon...
Jun 12 22:19:31 pxc mysql[2025]: * Stopping MySQL (Percona XtraDB Cluster) mysqld
Jun 12 22:19:46 pxc /etc/init.d/mysql[2128]: MySQL PID not found, pid_file detected/guessed: /var/run/mysqld/mysqld.pid
Jun 12 22:19:46 pxc mysql[2025]: ...done.
Jun 12 22:19:46 pxc systemd[1]: Stopped Percona XtraDB Cluster daemon.
root@pxc:~# systemctl status <email address hidden>
● <email address hidden> - Percona XtraDB Cluster daemon with config /etc/default/mysql.bootstrap
   Loaded: loaded (/lib/systemd/system/mysql@.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
root@pxc:~# systemctl start <email address hidden>
root@pxc:~# systemctl status <email address hidden>
● <email address hidden> - Percona XtraDB Cluster daemon with config /etc/default/mysql.bootstrap
   Loaded: loaded (/lib/systemd/system/mysql@.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-06-12 22:20:17 UTC; 3s ago
  Process: 2209 ExecStart=/etc/init.d/mysql start ${EXTRA_ARGS} (code=exited, status=0/SUCCESS)
  Process: 2135 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 2247 (mysqld_safe)
    Tasks: 42 (limit: 4915)
   CGroup: /<email address hidden>
           ├─2247 /bin/sh /usr/bin/mysqld_safe --wsrep-new-cluster
           └─2635 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/percona-xtradb-cluster --plugin-dir=/usr/lib/mysql/plugin --wsrep-provider=/usr/lib/galera3/libgalera_smm.so --wsrep-new-c

Jun 12 22:20:12 pxc systemd[1]: Starting Percona XtraDB Cluster daemon with config /etc/default/mysql.bootstrap...
Jun 12 22:20:15 pxc mysql[2209]: * Starting MySQL (Percona XtraDB Cluster) database server mysqld
Jun 12 22:20:17 pxc mysql[2209]: ...done.
Jun 12 22:20:17 pxc systemd[1]: Started Percona XtraDB Cluster daemon with config /etc/default/mysql.bootstrap.
root@pxc:~# systemctl status mysql
● mysql.service - Percona XtraDB Cluster daemon
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2018-06-12 22:19:46 UTC; 46s ago
  Process: 2025 ExecStop=/etc/init.d/mysql stop (code=exited, status=...

Read more...

Felipe Reyes (freyes) wrote :

James, do you have any ideas/suggestion how to fix this?

Felipe Reyes (freyes) wrote :

Percona-XtraDB-Cluster-57 package provided by percona.com for CentOS suffer from this issue too - https://pastebin.ubuntu.com/p/8phH93mXRh/

To post a comment you must log in.
This report contains Public Security information  Edit
Everyone can see this security related information.

Other bug subscribers