← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1670629] Re: postinst runs mysql_upgrade before server is properly started

 

** Also affects: mysql-5.7 (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Changed in: mysql-5.7 (Ubuntu Xenial)
       Status: New => Triaged

** Changed in: mysql-5.7 (Ubuntu Xenial)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1670629

Title:
  postinst runs mysql_upgrade before server is properly started

Status in mysql-5.7 package in Ubuntu:
  Triaged
Status in mysql-5.7 source package in Xenial:
  Triaged

Bug description:
  Hello,

  
  The corresponding apt error message looks like this:

  ...
  Do you want to continue? [Y/n] 
  Setting up mysql-server-5.7 (5.7.17-0ubuntu0.16.04.1) ...
  Renaming removed key_buffer and myisam-recover options (if present)
  mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
  Upgrade process encountered error and will not continue.
  mysql_upgrade failed with exit status 11
  dpkg: error processing package mysql-server-5.7 (--configure):
   subprocess installed post-installation script returned error exit status 1
  dpkg: dependency problems prevent configuration of mysql-server:
   mysql-server depends on mysql-server-5.7; however:
    Package mysql-server-5.7 is not configured yet.

  dpkg: error processing package mysql-server (--configure):
   dependency problems - leaving unconfigured
  No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                            Errors were encountered while processing:
   mysql-server-5.7
   mysql-server
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  
  The workaround is to put a `sleep 3` on the 320. line of mysql-server-5.7.postinst script (right before `mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?` )

  The root cause seems to be that invoke-rc.d does not execute systemctl
  --wait, and systemctl without wait doesn't wait until the database
  server daemon is up and listening.

  And of course it could be mitigated by using a systemd socket for
  mysql.

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