Bug 86309 - systemd-nspawn fails to start container when --tmpfs is used
Summary: systemd-nspawn fails to start container when --tmpfs is used
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-15 10:44 UTC by Mauro Santos
Modified: 2014-12-03 22:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
strace output (28.52 KB, text/plain)
2014-12-03 13:40 UTC, Mauro Santos
Details

Description Mauro Santos 2014-11-15 10:44:32 UTC
As the summary says, systemd-nspawn fails to star a container when --tmpfs is used. If omitting only --tmpfs from the command line then the container starts successfully.

I'm using the following options:
/usr/bin/systemd-nspawn -M centos --link-journal=no --bind=/home/centos:/home --tmpfs=/tmp:mode=1777 --network-bridge=mybr -D /virt/containers/centos

It fails with:
Spawning container centos on /virt/containers/centos.
Press ^] three times within 1s to kill container.
Container centos failed with error code 1.


OS: Arch Linux
Systemd: 217-6
Comment 1 Lennart Poettering 2014-12-03 01:15:37 UTC
Hmm, something appears to fail in the container without a proper error message. Could you run the nspawn command within "strace -f" and see if that shows any particular errors in the client that might be causing this?

If in doubt simply attach the strace -f fragment right before the child process in the container exits, and we can have a look. Thanks.
Comment 2 Mauro Santos 2014-12-03 13:40:08 UTC
Created attachment 110412 [details]
strace output

Strace output is attached. Nothing seems to stand out as a possible source of the problem (to me at least), but I don't have much experience interpreting the output of strace (or debugging in general).

Like I said before, if I omit the --tmpfs option I can start the container successfully. I can't say exactly when this stopped working as I don't use nspawn very often, but I haven't changed anything in my setup (systemd unit file or container) since the last time it worked fine.
Comment 3 Lennart Poettering 2014-12-03 16:56:56 UTC
Ah, the strace output was quite useful. Should be fixed in git now:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=04a919394069cf024559f78eb46692a3739641eb

WOuld be great to give this test run, to verify that all is good now for you!

Thanks!
Comment 4 Mauro Santos 2014-12-03 22:06:10 UTC
It seems to be working as expected here. Thanks for fixing it :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.