[systemd-devel] systemd-nspawn at .service is unusable

Lennart Poettering lennart at poettering.net
Thu Dec 4 17:43:12 PST 2014


On Thu, 04.12.14 20:12, Peter Lemenkov (lemenkov at gmail.com) wrote:

> Hello All!
> 
> I'm playing with systemd-nspawn at .service and cannot make it work. It
> seems that similar issues were discussed (and addressed upstream) in
> Debian bug #770275 ( https://bugs.debian.org/770275 ) however I
> believe I've hit by something else.
> 
> What I've done so far:
> 
> * Ensured that /var/lib/container exists
> * Created both  /var/log/journal/<machineid> and
> /var/lib/container/<containername>/var/log/journal/<machineid>
> * Ensured that Storage=persistent is set in
> /var/lib/container/<containername>/etc/systemd/journald.conf
> 
> Every my attempt to run "systemctl status
> systemd-nspawn@<containername>" ended up like this:
> 
> https://paste.fedoraproject.org/156640/14177088/
> 
> Please note that systemd-journald fails so I can't find out what's
> going on there. I'm stuck right here. Some other services failed as
> well, and I can't login using "machinectl login" but that's another
> story I believe.
> 
> Any advice on how to debug this and make
> systemd-nspawn@<containername> usable are highly appreciate!

What happens if you run the same nspawn command from the command line?
Does journald then start up correctly in it?

What happens if you add "debug" to the end of the nspawn cmdline? Do
you see anything interesting in the additional log output this
generates?

If it fails then, too. Can you "strace -ff -o ~/nspawnlogs" the whole nspawn process
(and hence also its child processes), then find the strace log this
created for journald, and check what the last bits are that it does.

Normally journald would log its own problems to kmsg. However that's
difficult inside a container...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list