Missing usr.sbin.mysqld AppArmor profile

Bug #1623964 reported by Florian Haas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
percona-xtradb-cluster-5.6 (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

This package is missing the usr.sbin.mysqld AppArmor profile that ships in mariadb-server-10.0 and mysql-server-5.7.

As a result in case of a pxc being installed on a server that previously had either of those packages installed, /usr/sbin/mysqld is unable to create files in /var/lib/percona-xtradb-cluster/, and the service is unable to start.

Sep 15 14:15:56 ubuntu systemd[1]: Starting LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon...
Sep 15 14:15:56 ubuntu mysql[31797]: * Starting MySQL (Percona XtraDB Cluster) database server mysqld
Sep 15 14:15:56 ubuntu /etc/init.d/mysql[31835]: MySQL PID not found, pid_file detected/guessed: /var/run/mysqld/mysqld.pid
Sep 15 14:15:57 ubuntu kernel: [43130.482986] audit: type=1400 audit(1473948957.156:42): apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/var/lib/percona-xtradb-cluster/daisy.lower-test" pid=32173 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
Sep 15 14:15:57 ubuntu kernel: [43130.483012] audit: type=1400 audit(1473948957.156:43): apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/var/lib/percona-xtradb-cluster/daisy.lower-test" pid=32173 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
Sep 15 14:15:57 ubuntu kernel: [43130.499375] audit: type=1400 audit(1473948957.172:44): apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/var/lib/percona-xtradb-cluster/ibdata1" pid=32173 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=113 ouid=113
Sep 15 14:15:57 ubuntu mysql[31797]: * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
Sep 15 14:15:57 ubuntu mysql[31797]: ...fail!
Sep 15 14:15:57 ubuntu systemd[1]: mysql.service: Control process exited, code=exited status=1
Sep 15 14:15:57 ubuntu systemd[1]: Failed to start LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon.

Workarounds:

- reload all AA profiles, removing AA protection for /usr/sbin/mysqld
- copy /etc/apparmor.d/usr.sbin.mysqld over from mariadb-server-10.0 or mysql-server-5.7, AND fix the datadir (as pxc uses /var/lib/percona-xtradb-cluster, rather than /var/lib/mysql).

Permanent fix:

- ship /etc/apparmor.d/usr.sbin.mysqld within the percona-xtradb-cluster-server package

Florian Haas (fghaas)
description: updated
Revision history for this message
Vincent Gerris (vgerris) wrote :

Related to:
https://bugs.launchpad.net/percona-server/+bug/1633431
can be fixed in once I think.

James Page (james-page)
Changed in percona-xtradb-cluster-5.6 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
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.