[Bug 1752705] Re: When run from systemd-nspawn, installation of mysql-server fails because postinst fails to shut down server

Matt Coleman mcoleman at datto.com
Fri Mar 2 15:29:08 UTC 2018


It also succeeds if I replace `dpkg --configure -a` with `ls`:
rm -rf testmysql && cp -a bionic testmysql && systemd-nspawn -D testmysql bash -c 'apt update && apt install mysql-server; ls'

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

Title:
  When run from systemd-nspawn, installation of mysql-server fails
  because postinst fails to shut down server

Status in mysql-5.7 package in Ubuntu:
  New
Status in systemd package in Ubuntu:
  New

Bug description:
  Creating a fresh Bionic directory with `debootstrap` and then
  attempting to install `mysql-server` inside a `systemd-nspawn`
  container fails with the following message:

  Setting up mysql-server-5.7 (5.7.21-1ubuntu1) ...
  invoke-rc.d: could not determine current runlevel
   * Stopping MySQL database server mysqld                                 [ OK ]
  update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
  Renaming removed key_buffer and myisam-recover options (if present)
  Error: Unable to shut down server with process id 532
  dpkg: error processing package mysql-server-5.7 (--configure):
   installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1

  
  Steps to reproduce:
  1. debootstrap bionic testmysql
  2. rm testmysql/etc/resolv.conf
  2. systemd-nspawn -D testmyql --bind /etc/resolv.conf /bin/bash -c 'apt update && apt install mysql-server'

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



More information about the foundations-bugs mailing list