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
Thanks for filing this bug in Ubuntu.
It looks like mysql was shutdown when the upgrade script kicked in: 0ubuntu0. 16.04.1) ... setup-backing- file' missing LSB tags and overrides setup-backing- file' missing LSB tags and overrides mysqld/ mysqld. sock' (2) while connecting to the MySQL server
Setting up mysql-server-5.7 (5.7.23-
insserv: warning: script 'S03cinder-
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-
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/
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: 03T15:34: 44.986625Z 0 [Note] Shutting down plugin 'binlog' 03T15:34: 44.986799Z 0 [Note] mysqld: Shutdown complete
...
2018-09-
2018-09-
There are also some apparmor denied messages: 8.713:40) : apparmor="STATUS" operation= "profile_ replace" profile= "unconfined" name="/ usr/sbin/ mysqld" pid=3975 comm="apparmor_ parser" 9.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 9.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 9.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 0.273:44) : apparmor="STATUS" operation= "profile_ replace" profile= "unconfined" name="/ usr/sbin/ mysqld" pid=4007 comm="apparmor_ parser" 2.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 2.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 2.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
[ 128.032366] audit: type=1400 audit(153598887
[ 129.265245] audit: type=1400 audit(153598887
[ 129.265269] audit: type=1400 audit(153598887
[ 129.265298] audit: type=1400 audit(153598887
[ 129.591787] audit: type=1400 audit(153598888
[ 131.337656] audit: type=1400 audit(153598888
[ 131.337684] audit: type=1400 audit(153598888
[ 131.337711] audit: type=1400 audit(153598888
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!