Description of problem: After terminating a container started by systemd-nspawn, it can't be started again. The container didn't boot properly, it got stuck when booting. Rebooting a computer helps. Version-Release number of selected component (if applicable): systemd-208-21.fc20.x86_64 kernel-3.16.2-200.fc20.x86_64 Steps to Reproduce: 1. yum -y --releasever=rawhide --nogpg --installroot=/srv/rawhide --disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release vim-minimal 2. systemd-nspawn -j -bD /srv/rawhide 3. machinectl terminate rawhide 4. repeat step 2 Actual results: $ sudo systemd-nspawn -j -bD /srv/rawhide Spawning namespace container on /srv/rawhide (console is /dev/pts/4). Init process in the container running as PID 5859. Failed to register machine: Input/output error Container failed with error code 251. Expected results: The container is started as expected. Additional info: The bug is not present on my rawhide machine with systemd-216-5.fc22.x86_64 and kernel-3.17.0-0.rc4.git1.1.fc22.x86_64. I've found a similar upstream bugreport (https://bugs.freedesktop.org/show_bug.cgi?id=68370), but the workaround doesn't apply for me, because I don't see any sys/fs/cgroup/systemd/system.slice/machine-rawhide.scope/ directory on my system.
More additional information: Terminating a container that booted up properly with machinectl results in the same error. Killing the systemd-nspawn process directly with kill -9 works, the container can be started again.
Looks like duplicate of 988877
Hi. I run into this too with systemd-208-26.fc20.x86_64. [root@zaphod centos-6]# systemd-nspawn --bind=/home -b Spawning namespace container on /home/containers/centos-6 (console is /dev/pts/2). Init process in the container running as PID 11409. Failed to register machine: Input/output error Container failed with error code 251. It's happened after I had killed the machine with 'machinectl terminate centos-6'. I still can see these files/directories on my machine even though the container is not running: /sys/fs/cgroup/systemd/machine.slice/machine-centos\x2d6.scope/ /run/systemd/system/machine-centos\x2d6.scope /run/systemd/system/machine-centos\x2d6.scope.d/ It seems like the cgroup and scope units were not properly cleaned up.
Additional information from the journal: systemd[1]: machine-rawhide.scope stopping timed out. Killing. systemd[1]: machine-rawhide.scope still around after SIGKILL. Ignoring. Not fixed by upstream commit 21b2ce39d4038cd6176394836fdcfb7fba63f424 (service: use the right timeout for stop processes we fork).
As a work around one can specify a new name with -M.
One more observation: Deleting the leftover files does *not* solve the problem.
After debugging this, it appears to be the same problem as described in http://lists.freedesktop.org/archives/systemd-devel/2014-November/025700.html (follow-up in http://lists.freedesktop.org/archives/systemd-devel/2014-December/025778.html). The problem is "fixed" by backporting http://cgit.freedesktop.org/systemd/systemd/commit/?id=1baccdda2e954214e0c5463d6ed8f06009b33c41. However, after the fix, the terminal that was used to spawn the container (using -b) gets stalled and the systemd-nspawn process has to be killed by a SIGKILL. I think that the "fix" is the lesser of two evils, so I'll probably backport it. Zbyszek, any objections?
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.