postinst fails when disabled via systemctl

Bug #1728664 reported by Ryan Lovett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
New
Undecided
Unassigned

Bug Description

We disable mysql-server-5.7 via `systemctl disable mysql`. When the package is upgraded via apt-get, the following code is run in .postinst:

    mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?
    if [ $result -ne 0 -a $result -ne 2 ]; then
      echo "mysql_upgrade failed with exit status $result" >&2
      exit 1
    fi

I think postinst should bypass mysql_upgrade if the admin has disabled mysql via init.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.20-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.4.0-87.110-generic 4.4.73
Uname: Linux 4.4.0-87-generic x86_64
.etc.apparmor.d.usr.sbin.mysqld: Error: [Errno 2] No such file or directory: '/etc/apparmor.d/usr.sbin.mysqld'
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Mon Oct 30 10:10:14 2017
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: False
SourcePackage: mysql-5.7
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.apparmor.d.usr.sbin.mysqld: [deleted]
upstart.mysql.override: manual

Revision history for this message
Ryan Lovett (ryan-spacecoaster) wrote :
Revision history for this message
Ryan Lovett (ryan-spacecoaster) wrote :

Deleted journal errors attachment because it contained information not relevant to mysql.

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.