[Lxc-users] what's the difference in lxc-attach

Serge E. Hallyn serge at hallyn.com
Mon Jul 18 19:02:54 UTC 2011


(sorry, just realized postfix has been messing up my email, hope this
comes through ok)

Quoting Ramez Hanna (rhanna at informatiq.org):
> in f15 systemd whenever a user starts a process it looks like this
> ├ user
> │ ├ root
> │ │ └ 86
> │ │   ├ 24814 -bash
> │ │   ├ 24848 top
> │ │   └ 31324 login -- root
> │ └ rhanna
> │   ├ 56
> │   │ ├  1002 pam: gdm-password
> │   │ ├  1047 /usr/bin/enlightenment
> │   │ ├  1058 dbus-launch --sh-syntax --exit-with-session
> │   │ ├  1059 /bin/dbus-daemon --fork --print-pid 5 --print-address 7
> --sess...
> 
> so i would expect lxc to create it's cgroup under the user (root in this
> case) instead
> while it currebtly shows it like this
> boss is the name of the container
> ├ 24811 [kworker/1:0]
> ├ boss
> │ ├ 8914 init [3]
> │ ├ 9135 /usr/sbin/cron
> │ ├ 9146 /usr/sbin/sshd
> 
> now I am not trying to use systemd-nspawn to replace lxc or anything, I am
> just using it to debug if i had problems in my container rootfs
> and well if nspawn doesn't screw up my host then it is doing something
> better

Sorry I've not had time to read this thread through sufficiently, but the
above, at first glance, is telling.  Does fedora's initramfs set up the
first part of the cgroup hierarchy?  My guess is that's the problem and
so systemd is expecting /user to be already set up.  So to support
systemd, we may need to either have a init wrapper to do some of the
initramfs cruft, or have lxc do it.  Yuck to both.  Yuck to use of
initramfs for anything other than loading needed kernel modules :)

-serge





More information about the lxc-users mailing list