Public bug reported:

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

** Affects: mysql-5.7 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug xenial

** Attachment removed: "JournalErrors.txt"
   
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1728664/+attachment/5000238/+files/JournalErrors.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1728664

Title:
  postinst fails when disabled via systemctl

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1728664/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to