postinst fails on mysql_upgrade if database is already upgraded

Bug #1566406 reported by Yoda
120
This bug affects 24 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Fix Released
High
Robie Basak

Bug Description

Failed at upgrade.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.11-0ubuntu3
ProcVersionSignature: Ubuntu 4.4.0-17.33-generic 4.4.6
Uname: Linux 4.4.0-17-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.1-0ubuntu1
Architecture: amd64
Date: Tue Apr 5 16:47:05 2016
ErrorMessage: subprocess installed post-installation script returned error exit status 2
InstallationDate: Installed on 2016-03-09 (27 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
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: ['ibtmp1', 'debian-5.6.flag', 'ib_buffer_pool', 'ib_logfile1', 'ib_logfile0', 'mysql', 'sys', 'adacor2', 'mysql_upgrade_info', 'debian-5.7.flag', 'arduino', 'OpenHAB', 'ibdata1', 'auto.cnf', 'performance_schema']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.4.0-17-generic.efi.signed root=UUID=736f1be3-6eb0-4bd7-94df-883748bfd45e ro quiet splash vt.handoff=7
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1
 apt 1.2.9
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.11-0ubuntu3 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
UpgradeStatus: Upgraded to xenial on 2016-03-10 (25 days ago)

Revision history for this message
Yoda (jofe) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mysql-5.7 (Ubuntu):
status: New → Confirmed
Robie Basak (racb)
summary: - package mysql-server-5.7 5.7.11-0ubuntu3 failed to install/upgrade:
- subprocess installed post-installation script returned error exit status
- 2
+ postinst fails on mysql_upgrade if database is already upgraded
Changed in mysql-5.7 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
status: Triaged → In Progress
assignee: nobody → Robie Basak (racb)
Revision history for this message
Robie Basak (racb) wrote :
Robie Basak (racb)
Changed in mysql-5.7 (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.7 - 5.7.11-0ubuntu5

---------------
mysql-5.7 (5.7.11-0ubuntu5) xenial; urgency=medium

  * d/mysql-server-5.7.postinst: ignore mysql_upgrade's exit status when
    it is one that includes the indication that there is nothing to do
    (LP: #1566406).

 -- Robie Basak <email address hidden> Thu, 07 Apr 2016 11:58:28 +0100

Changed in mysql-5.7 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
agb (agb-ukr) wrote :
Download full text (4.0 KiB)

Yesterday (04/09/2016) I perfomed dist-upgrade on 16.04beta
Apt-get Pocess removed mysql-server 5.6 and do nothing else (did not install 5.7 instead).
Then I intalled mysql-server 5.7 (5.7.11-0ubuntu5) by myself.
But I got this error:

--
Setting up mysql-server-5.7 (5.7.11-0ubuntu5) ...
insserv: script virtualbox: service vboxdrv already provided!
insserv: script virtualbox: service virtualbox already provided!
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ systemctl status mysql.service
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Вс 2016-04-10 21:59:18 EEST; 24s ago
  Process: 25917 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 25913 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 25917 (code=exited, status=1/FAILURE); : 25918 (mysql-systemd-s)
    Tasks: 2 (limit: 512)
   CGroup: /system.slice/mysql.service
           └─control
             ├─25918 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─25979 sleep 1

апр 10 21:59:18 home systemd[1]: Starting MySQL Community Server...
апр 10 21:59:18 home systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE

$ journalctl -xe
апр 10 21:59:18 home systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
апр 10 21:59:18 home systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
апр 10 21:59:18 home systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
апр 10 21:59:18 home mysqld[25917]: mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
апр 10 21:59:18 home mysqld[25917]: mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
апр 10 21:59:18 home systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
апр 10 21:59:48 home systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
апр 10 21:59:48 home systemd[1]: mysql.service: Unit entered failed state.
апр 10 21:59:48 home systemd[1]: mysql.service: Failed with result 'exit-code'.
апр 10 21:59:48 home systemd[1]: m...

Read more...

Revision history for this message
Robie Basak (racb) wrote : Re: [Bug 1566406] Re: postinst fails on mysql_upgrade if database is already upgraded

@agb

I think you have a completely different issue. If you think this is a
bug in Ubuntu, please could you report it as a separate bug? Please use
"ubuntu-bug" to report it so we get information on package versions etc.
in the report. Thanks!

Revision history for this message
agb (agb-ukr) wrote :

@Robie Basak
done #1569163
thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.