percona-server-server-5.6 misses apparmor file - fails to install on 16.04

Bug #1633431 reported by Vincent Gerris
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

sudo apt-get install percona-server-server-5.6 fails with:

Setting up percona-server-server-5.6 (5.6.22-rel71.0-0ubuntu4.1) ...
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package percona-server-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 percona-server-server-5.6

This turned out to be caused by at least the apparmor profile not being there.
If a previous install of mysql-server was there, the file was there, but missing the lines to access the percona lib dir.

To fix this I resused that file and added the last two lines:
# Allow data dir access
  /var/lib/mysql/ r,
  /var/lib/mysql/** rwk,
  /var/lib/percona-server/ r,
  /var/lib/percona-server/** rwk,

then this to be able to control it (as root):
rm -r /var/lib/mysql* # Remove any old database (WARNING!)
setup mysql_install_db -u mysql # Install new database
systemctl unmask mysql.service # Enables the service for systemd
service mysql start # start the service.

The fix is probable to add a proper apparmor profile to the package, one has to decide if the 'alternative db' dirs have to be included

Tags: pkg
tags: added: pkg
Revision history for this message
Vincent Gerris (vgerris) wrote :
Revision history for this message
Vincent Gerris (vgerris) wrote :

N.B. workaround applies to file : /etc/apparmor.d/usr.bin.mysqld

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-3579

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.