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

2018-03-02 Thread Matt Coleman
Thanks for pointing out the changes to server start/stop, Robie. Adding
the `--as-pid2` parameter to `systemd-nspawn` allows it to work.

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

** Changed in: systemd (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to 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

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

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

2018-03-02 Thread Matt Coleman
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
Bugs, which is subscribed to 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

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

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

2018-03-02 Thread Matt Coleman
It behaves differently (the installation succeeds) if you install mysql-
server from a bash prompt inside the container. Running the installation
as a parameter to `systemd-nspawn` will fail. I have tested this on a
16.04.3 system and an 18.04 system.

I just noticed something especially weird: if I add `dpkg --configure
-a` to the end of the `systemd-nspawn` command, then the `apt install`
command will reliably finish.

Prepare a base container to be used for the tests:
1. debootstrap bionic bionic
2. rm bionic/etc/resolv.conf

This will always fail:
sudo rm -rf testmysql && sudo cp -a bionic testmysql && sudo systemd-nspawn -D 
testmysql bash -c 'apt update && apt install mysql-server'

This will always succeed:
sudo rm -rf testmysql && sudo cp -a bionic testmysql && sudo systemd-nspawn -D 
testmysql bash -c 'apt update && apt install mysql-server; dpkg --configure -a'

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to 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

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs