postinst fails when disabled via systemctl
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-
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-
ProcVersionSign
Uname: Linux 4.4.0-87-generic x86_64
.etc.apparmor.
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Mon Oct 30 10:10:14 2017
Logs.var.
MySQLConf.
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
SourcePackage: mysql-5.7
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
upstart.
Deleted journal errors attachment because it contained information not relevant to mysql.