Re: [systemd-devel] Rebooting systemd-nspawn container results in shutdown
Lennart Poettering lenn...@poettering.net schrieb: [...] systemd-219 on the host, 218 in the container. This is fixed in git since a while now, please test. Yes, works for me in v220. Thanks. -- Replies to list only preferred. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Rebooting systemd-nspawn container results in shutdown
On Mon, 27.04.15 20:00, Kai Krakow (hurikha...@gmail.com) wrote: Lennart Poettering lenn...@poettering.net schrieb: On Sun, 26.04.15 16:55, Kai Krakow (hurikha...@gmail.com) wrote: Hello! I've successfully created a Gentoo container on top of a Gentoo host. I can start the container with machinectl, as I can with systemctl start Inside the container (logged in via SSH), I could issue a reboot command. But that just results in the container being shutdown. It never comes back unless I restart the machine with systemctl or machinectl. What systemd versions run on the host and in the container? systemd-219 on the host, 218 in the container. This is fixed in git since a while now, please test. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Rebooting systemd-nspawn container results in shutdown
On Sun, 26.04.15 16:55, Kai Krakow (hurikha...@gmail.com) wrote: Hello! I've successfully created a Gentoo container on top of a Gentoo host. I can start the container with machinectl, as I can with systemctl start Inside the container (logged in via SSH), I could issue a reboot command. But that just results in the container being shutdown. It never comes back unless I restart the machine with systemctl or machinectl. What systemd versions run on the host and in the container? if you strace the nspawn process, and then issue the reboot command, what are the last 20 lines this generates when nspawn exits? Please paste somewhere. Is the service in a failed state or so when this doesn't work? What is the log output of the service then? BTW: Is there a way to automatically bind-mount some directories instead of systemctl edit --full the service file and add those? Currently not, but there's a TODO item to add .nspawn files that may be placed next to container directories with additional options. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Rebooting systemd-nspawn container results in shutdown
Lennart Poettering lenn...@poettering.net schrieb: On Sun, 26.04.15 16:55, Kai Krakow (hurikha...@gmail.com) wrote: Hello! I've successfully created a Gentoo container on top of a Gentoo host. I can start the container with machinectl, as I can with systemctl start Inside the container (logged in via SSH), I could issue a reboot command. But that just results in the container being shutdown. It never comes back unless I restart the machine with systemctl or machinectl. What systemd versions run on the host and in the container? systemd-219 on the host, 218 in the container. if you strace the nspawn process, and then issue the reboot command, what are the last 20 lines this generates when nspawn exits? Please paste somewhere. Sure: https://gist.github.com/kakra/d2ff59deec079e027d71 Is the service in a failed state or so when this doesn't work? # systemctl status systemd-nspawn@gentoo\\x2dcontainer\\x2dbase.service ● systemd-nspawn@gentoo\x2dcontainer\x2dbase.service - Container gentoo- container-base Loaded: loaded (/etc/systemd/system/systemd- nspawn@gentoo\x2dcontainer\x2dbase.service; enabled; vendor preset: enabled) Active: inactive (dead) since Mo 2015-04-27 19:54:36 CEST; 2min 30s ago Docs: man:systemd-nspawn(1) Process: 14721 ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit -- boot --link-journal=try-guest --network-veth --machine=%I -- bind=/usr/portage --bind-ro=/usr/src (code=exited, status=133) Main PID: 14721 (code=exited, status=133) Status: Terminating... Apr 27 19:54:36 jupiter systemd-nspawn[14721]: [ OK ] Reached target Unmount All Filesystems. Apr 27 19:54:36 jupiter systemd-nspawn[14721]: [ OK ] Stopped target Local File Systems (Pre). Apr 27 19:54:36 jupiter systemd-nspawn[14721]: Stopping Remount Root and Kernel File Systems... Apr 27 19:54:36 jupiter systemd-nspawn[14721]: [ OK ] Stopped Remount Root and Kernel File Systems. Apr 27 19:54:36 jupiter systemd-nspawn[14721]: [ OK ] Reached target Shutdown. Apr 27 19:54:36 jupiter systemd-nspawn[14721]: Sending SIGTERM to remaining processes... Apr 27 19:54:36 jupiter systemd-nspawn[14721]: Sending SIGKILL to remaining processes... Apr 27 19:54:36 jupiter systemd-nspawn[14721]: Rebooting. Apr 27 19:54:36 jupiter systemd[1]: Stopping Container gentoo-container- base... Apr 27 19:54:36 jupiter systemd[1]: Stopped Container gentoo-container-base. What is the log output of the service then? Is it sufficient what's included in the status above? BTW: Is there a way to automatically bind-mount some directories instead of systemctl edit --full the service file and add those? Currently not, but there's a TODO item to add .nspawn files that may be placed next to container directories with additional options. This is for an imagined use-case where I have multiple similar containers running which should all mount the same storage pool (e.g. web pages, just each container runs a different PHP). -- Replies to list only preferred. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Rebooting systemd-nspawn container results in shutdown
Hello! I've successfully created a Gentoo container on top of a Gentoo host. I can start the container with machinectl, as I can with systemctl start Inside the container (logged in via SSH), I could issue a reboot command. But that just results in the container being shutdown. It never comes back unless I restart the machine with systemctl or machinectl. BTW: Is there a way to automatically bind-mount some directories instead of systemctl edit --full the service file and add those? Here's the service file (modified to bind the portage and src tree): # /etc/systemd/system/systemd-nspawn@gentoo\x2dcontainer\x2dbase.service # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] Description=Container %I Documentation=man:systemd-nspawn(1) PartOf=machines.target Before=machines.target [Service] ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot --link- journal=try-guest --network-veth --machine=%I --bind=/usr/portage --bind- ro=/usr/src KillMode=mixed Type=notify RestartForceExitStatus=133 SuccessExitStatus=133 Delegate=yes MemoryLimit=4G [Install] WantedBy=machines.target -- Replies to list only preferred. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Rebooting systemd-nspawn container results in shutdown
On 27 April 2015 at 00:55, Kai Krakow hurikha...@gmail.com wrote: I've successfully created a Gentoo container on top of a Gentoo host. I can start the container with machinectl, as I can with systemctl start Inside the container (logged in via SSH), I could issue a reboot command. But that just results in the container being shutdown. It never comes back unless I restart the machine with systemctl or machinectl. Perhaps related to https://bugs.freedesktop.org/show_bug.cgi?id=87428 ? Regards, Jonathan ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Rebooting systemd-nspawn container results in shutdown
Jonathan Liu net...@gmail.com schrieb: On 27 April 2015 at 00:55, Kai Krakow hurikha...@gmail.com wrote: I've successfully created a Gentoo container on top of a Gentoo host. I can start the container with machinectl, as I can with systemctl start Inside the container (logged in via SSH), I could issue a reboot command. But that just results in the container being shutdown. It never comes back unless I restart the machine with systemctl or machinectl. Perhaps related to https://bugs.freedesktop.org/show_bug.cgi?id=87428 ? Thanks for the pointer. I didn't try machinectl reboot but I believe it is the same problem. So let's maybe wait for systemd 220 (using 219 now outside of the container, 218 inside). -- Replies to list only preferred. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel