[systemd-devel] After poweroff nspawn container can not be started again (with 207)

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Sun Sep 22 12:24:24 PDT 2013


Hello

This works fine with systemd-204.
(Running on Linux-3.8.11)

# cat /etc/systemd/system/systemd-nspawn at .socket
[Unit]
Description=The SSH socket of ARCH container in port %I

[Socket]
ListenStream=%I



starting first time:
systemd[1]: Starting Container 22222...
systemd-nspawn[272]: Spawning namespace container on /container/arch
(console is /dev/pts/1).
systemd-nspawn[272]: Init process in the container running as PID 275.
systemd[1]: Started Container 22222.
dbus-daemon[200]: dbus[200]: [system] Activating via systemd: service
name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service'
dbus[200]: [system] Activating via systemd: service
name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service'
systemd[1]: Starting Virtual Machine and Container Slice.
systemd[1]: Created slice Virtual Machine and Container Slice.
systemd[1]: Starting Virtual Machine and Container Registration Service...
dbus-daemon[200]: dbus[200]: [system] Successfully activated service
'org.freedesktop.machine1'
dbus[200]: [system] Successfully activated service
'org.freedesktop.machine1'
systemd[1]: Started Virtual Machine and Container Registration Service.
systemd-machined[276]: New machine arch.
systemd[1]: Starting Container arch.
systemd[1]: Started Container arch.
systemd-nspawn[272]: systemd 204 running in system mode. (+PAM -LIBWRAP
-AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
systemd-nspawn[272]: Detected virtualization 'systemd-nspawn'.
systemd-nspawn[272]: Welcome to Arch Linux!


After poweroff:
systemd-nspawn[272]: Sending SIGTERM to remaining processes...
systemd-nspawn[272]: Sending SIGKILL to remaining processes...
systemd-nspawn[272]: Unmounting file systems.
systemd-nspawn[272]: Unmounting /sys/kernel/debug.
systemd-nspawn[272]: Unmounting /sys/kernel/config.
systemd-nspawn[272]: Unmounting /dev/hugepages.
systemd-nspawn[272]: Unmounting /dev/mqueue.
systemd-nspawn[272]: All filesystems unmounted.
systemd-nspawn[272]: Storage is finalized.
systemd-nspawn[272]: Container has been shut down.


Trying to start again:
systemd[1]: Starting Container 22222...
systemd-nspawn[339]: Spawning namespace container on /container/arch
(console is /dev/pts/1).
systemd-nspawn[339]: Init process in the container running as PID 342.
systemd[1]: Started Container 22222.
systemd-nspawn[339]: Failed to register machine: File exists
systemd-nspawn[339]: Container failed with error code 239.
systemd[1]: systemd-nspawn at 22222.service: main process exited,
code=exited, status=239/n/a
systemd[1]: Unit systemd-nspawn at 22222.service entered failed state.
...
...
...
systemd[1]: Starting Container 22222...
systemd[1]: systemd-nspawn at 22222.service start request repeated too
quickly, refusing to start.
systemd[1]: Failed to start Container 22222.
systemd[1]: Unit systemd-nspawn at 22222.socket entered failed state.



I can start it again, but only one time, after doing:
# machinectl terminate arch
# systemctl stop systemd-nspawn at 22222.socket
# systemctl stop systemd-nspawn at 22222.service
# systemctl start systemd-nspawn at 22222.socket

But after a second poweroff, there is no way to be started again, I
guess because of:
# systemctl status machine-arch.scope
machine-arch.scope - Container arch
   Loaded: loaded (/run/systemd/system/machine-arch.scope; static)
  Drop-In: /run/systemd/system/machine-arch.scope.d
           └─90-Description.conf, 90-TimeoutStopUSec.conf
   Active: failed (Result: timeout) since Sun 2013-09-22 16:10:04 ART;
5min ago

Logs:
systemd[1]: Starting Container 22222...
systemd-nspawn[1025]: Spawning namespace container on /container/arch
(console is /dev/pts/1).
systemd-nspawn[1025]: Init process in the container running as PID 1028.
systemd[1]: Started Container 22222.
systemd-machined[882]: Failed to start machine scope: Unit
machine-arch.scope already exists.
systemd-nspawn[1025]: Failed to register machine: Input/output error
systemd-nspawn[1025]: Container failed with error code 251.
systemd[1]: systemd-nspawn at 22222.service: main process exited,
code=exited, status=251/n/a
systemd[1]: Unit systemd-nspawn at 22222.service entered failed state.



-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130922/fda2e01e/attachment.pgp>


More information about the systemd-devel mailing list