Comment 2 for bug 1790508

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

It looks like mysql was shutdown when the upgrade script kicked in:
Setting up mysql-server-5.7 (5.7.23-0ubuntu0.16.04.1) ...
insserv: warning: script 'S03cinder-setup-backing-file' missing LSB tags and overrides
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
insserv: warning: script 'cinder-setup-backing-file' missing LSB tags and overrides
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1

The mysql logs just show a graceful shutdown:
...
2018-09-03T15:34:44.986625Z 0 [Note] Shutting down plugin 'binlog'
2018-09-03T15:34:44.986799Z 0 [Note] mysqld: Shutdown complete

There are also some apparmor denied messages:
[ 128.032366] audit: type=1400 audit(1535988878.713:40): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/mysqld" pid=3975 comm="apparmor_parser"
[ 129.265245] audit: type=1400 audit(1535988879.945:41): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/3993/status" pid=3993 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 129.265269] audit: type=1400 audit(1535988879.945:42): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=3993 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 129.265298] audit: type=1400 audit(1535988879.945:43): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/3993/status" pid=3993 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 129.591787] audit: type=1400 audit(1535988880.273:44): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/mysqld" pid=4007 comm="apparmor_parser"
[ 131.337656] audit: type=1400 audit(1535988882.017:45): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/4086/status" pid=4086 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 131.337684] audit: type=1400 audit(1535988882.021:46): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=4086 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 131.337711] audit: type=1400 audit(1535988882.021:47): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/4086/status" pid=4086 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Could you please try the following:

sudo systemctl restart mysql
sudo systemctl status mysql

And then:
sudo apt update
sudo apt -f install

And keep an eye in the output of "dmesg -w" while doing that, to see if new apparmor DENIED messages appear.

Thanks!