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

Reply via email to