[systemd-devel] LXC not working with systemd 209 or later

Leonid Isaev lisaev at umail.iu.edu
Fri Apr 4 15:17:08 PDT 2014


On Fri, 04 Apr 2014 21:19:45 +0100
John Lane <systemd at jelmail.com> wrote:

> [...]
>
> I did this: systemd-nspawn -bD /srv/lxc/testcontainer
> 
> Starting the container this way is pretty-much instantaneous. You can 
> log in and halt it cleanly.

Now that's interesting...

> > 3. How do you mount API filesystems into the container (your config doesn't
> > have /sys and /proc entries)? Try putting the fstab generated by the
> > archlinux template (because that one I tested and it works).
> AIUI systemd does this automatically. They are mounted in my container.
> # df /proc /proc/sys /sys
> Filesystem     1K-blocks  Used Available Use% Mounted on
> proc                   0     0         0    - /proc
> proc                   0     0         0    - /proc
> sysfs                  0     0         0    - /sys

You are right, a container can be run without any lxc.mount entries at all.

> 
> However, FYI, the following works and gives verbose logging output.
> 
> lxc-start -n testcontainer /usr/lib/systemd/systemd -- 
> --log-target=console --log-level=debug

... which is?

> I am now at the point where I have 2 containers, one created by 
> lxc-archlinux (which works) and one created using what I believe are 
> similar equivalent steps. They both have the exact same lxc config and 
> the exact same packages installed. I still have the problem, but I have 
> discovered more info...
> 
> I get "user at 0.service start operation timed out. Terminating."
> 
> I tried to execute "systemd --user" manually and got "Trying to run as 
> user instance, but $XDG_RUNTIME_DIR is not set".
> 
> I've been digging around and noticed in the journal:
> 
> Failed to open private bus connection: Failed to connect to socket 
> /run/user/0/dbus/user_bus_socket: No such file or directory
>
> and
> 
> pam_systemd(login:session): Failed to create session: Connection timed out
> 
> I believe the problem lies in pam_systemd timing out (hence the login 
> delay) because it can't talk to systemd-logind due to some IPC problem 
> that I can't work out yet...
>

It's difficult to say what's going on without a verbose journal output... Can
you obtain one? Can you post your container creation scripts, so that I
try to reproduce your issue over the weekend?

Also, what's the answer to Tom's question?

Cheers, 
-- 
Leonid Isaev
GnuPG key fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140404/552b8d14/attachment-0001.sig>


More information about the systemd-devel mailing list