package mysql-hostname-5.7 5.7.15-0ubuntu0.16.04.1 failed to install/upgrade: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück

Bug #1636328 reported by Thomas Mayer
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Error happened during upgrade from up-to-date 14.04.x to 16.04.x

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.15-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.4.0-45.66~14.04.1-generic 4.4.21
Uname: Linux 4.4.0-45-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Tue Oct 25 01:26:59 2016
ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
InstallationDate: Installed on 2013-08-21 (1159 days ago)
InstallationMedia: Ubuntu-Server 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
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: ['mysql', 'debian-5.5.flag', 'test', 'mysql_upgrade_info', 'mysql-bin.index', 'ibdata1', 'ib_logfile0', 'ib_logfile1', 'quantum_development', 'quantum_test', 'quantum_2085', 'mysql-bin.000917', 'mysql-bin.000918', 'mysql-bin.000919', 'mysql-bin.000920', 'mysql-bin.000921', 'mysql-bin.000922', 'mysql-bin.000923', 'mysql-bin.000924', 'performance_schema', 'mysql-bin.000925']
ProcCmdline: BOOT_IMAGE=/vmlinuz-4.4.0-45-generic root=UUID=16120d81-8cde-4e81-87cd-f55f65a4923b ro rootflags=subvol=@ pcie_aspm=force "acpi_osi=!Windows 2012" acpi=force acpi_enforce_resources=lax i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 nomdmonddf nomdmonisw
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: mysql-5.7
Title: package mysql-hostname-5.7 5.7.15-0ubuntu0.16.04.1 failed to install/upgrade: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
UpgradeStatus: Upgraded to xenial on 2016-10-24 (0 days ago)

Revision history for this message
Thomas Mayer (thomas303) wrote :
Revision history for this message
Thomas Mayer (thomas303) wrote :

After that I got a list of errors:

Die Systemaktualisierung wurde abgebrochen. Ihr System könnte sich in
einem nicht verwendbaren Zustand befinden. Eine Wiederherstellung
wird gestartet (»dpkg --configure -a«).

mysql-server-5.7 (5.7.15-0ubuntu0.16.04.1) wird eingerichtet ...
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
2016-10-24T23:30:34.029794Z 0 [ERROR] unknown variable 'log=/var/log/mysql.log'
2016-10-24T23:30:34.034909Z 0 [ERROR] Aborting
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
dpkg: Fehler beim Bearbeiten des Paketes mysql-server-5.7 (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von mysql-server:
 mysql-server hängt ab von mysql-server-5.7; aber:
  Paket mysql-server-5.7 ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes mysql-server (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Fehler traten auf beim Bearbeiten von:
 mysql-server-5.7
 mysql-server

Systemaktualisierung wurde abgeschlossen

Die Systemaktualisierung wurde vollständig abgeschlossen, jedoch
traten während der Systemaktualisierung Fehler auf.

Revision history for this message
Thomas Mayer (thomas303) wrote :

Related: #1571865 which however has different errors and is fixed already. Therefore, this issue is not a duplicate.

Revision history for this message
Thomas Mayer (thomas303) wrote :

Coming from 14.04, my configuration files of mysql were highly customized. That said, this issue is not necessarily a bug.

Revision history for this message
Thomas Mayer (thomas303) wrote :

After the upgrade, I notice that my original /etc/mysql/my.cnf got replaced by a symlink:

ls -lh /etc/mysql/my.cnf
lrwxrwxrwx 1 root root 24 Okt 25 01:09 /etc/mysql/my.cnf -> /etc/alternatives/my.cnf

ls -lh /etc/alternatives/my.cnf
lrwxrwxrwx 1 root root 26 Okt 25 01:09 /etc/alternatives/my.cnf -> /etc/mysql/my.cnf.migrated

I assume that some script tried to somehow migrate my old configuration, but failed doing that in a clean manner (I'll have to fix something manually).

Revision history for this message
Thomas Mayer (thomas303) wrote :

I got it fixed manually. What I did was:

mv /etc/mysql/my.cnf.migrated /etc/mysql/conf.d/custom.cnf
cd /etc/alternatives
rm my.cnf
ln -s /etc/mysql/my.cnf.fallback my.cnf

As dpkg --configure -a still threw errors in the manner of

2016-10-25T09:06:10.251866Z 0 [ERROR] unknown variable 'log=/var/log/mysql.log'
2016-10-25T09:07:29.715102Z 0 [ERROR] unknown variable 'thread_concurrency=8'
2016-10-25T09:07:53.726055Z 0 [ERROR] unknown variable 'innodb_use_sys_malloc=0'

I removed the corresponding lines from my custom configuration in /etc/mysql/conf.d/custom.cnf

After that, dpkg --configure -a was running without errors and thereby successfully converted the tablespaces to their new binary representation

dpkg --configure -a
mysql-server-5.7 (5.7.15-0ubuntu0.16.04.1) wird eingerichtet ...
Renaming removed key_buffer and myisam-recover options (if present)
mysql start/running, process 12050
mysql stop/waiting
mysql start/running, process 12410
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
[...]
Checking if update is needed.
mysql stop/waiting
mysql start/running, process 12647
mysql-server (5.7.15-0ubuntu0.16.04.1) wird eingerichtet ...

After that, MySQL is up and running again.

In the end I assume that the original error was just that the three lines had to be removed from /etc/mysql/my.cnf.migrated. That would have allowed the ubuntu major release update to run through smoothly and without manual intervention. An improvement would have been to just ignore these lines, even if they exist (with the potential of severe damage in other cases, of course).

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for sharing your solution Thomas!
The mentioned "potential of severe damage" is the reasons some - if not most - config upgrades require user intervention as soon as it is a custom config.

But I'm happy to know you are up and running again.

per former report setting the status to invalid.

Changed in mysql-5.7 (Ubuntu):
status: New → Invalid
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.