[lxc-devel] issue with cgroups on very first start of any container after bootstrapping the host

Serge Hallyn serge.hallyn at canonical.com
Thu Jun 21 13:51:15 UTC 2012


Quoting Jäkel, Guido (G.Jaekel at dnb.de):
> Hello Developers,
> 
> using Gentoo's   lxc-0.8.0_rc1-r4  with a Kernel  gentoo-sources-3.3.5  I observe the following issue concerning the cgroupfs:
> 
> For reasons of compatibility I have still mounted the controllers of the cgroupfs at a single mountpoint  /cgroup/ . 
> 
> 	# grep cgroup /etc/fstab:
> 	cgroup                  /cgroup         cgroup          defaults        0 0
> 
> After a bootstrap of the host this shows up as
> 
> 	# grep cgroup /proc/mounts 
> 	cgroup /cgroup cgroup rw,relatime,blkio,freezer,devices,memory,cpuacct,cpu,cpuset 0 0    
> 
> 
> 
> If I now try to start the first container, it will fail  (for *any* previous well working container). The important messages in the log are:
> 
> 
>       lxc-start 1340194612.650 INFO     lxc_cgroup - [1] found cgroup mounted at '/cgroup',opts='rw,relatime,blkio,freezer,devices,memory,cpuacct,cpu,cpuset'
>       lxc-start 1340194612.650 DEBUG    lxc_cgroup - get_init_cgroup: found init cgroup for subsys (null) at /
> 
> 
>       lxc-start 1340194612.650 DEBUG    lxc_cgroup - cgroup /cgroup has flags 0x0
>       lxc-start 1340194612.682 INFO     lxc_cgroup - created cgroup '/cgroup//lxc/testcat0'
>       lxc-start 1340194612.682 DEBUG    lxc_cgroup - checking '/proc/bus/usb' (usbfs)
>       lxc-start 1340194612.683 DEBUG    lxc_conf - move '(null)' to '10591'
>       lxc-start 1340194612.762 DEBUG    lxc_start - Dropped cap_sys_boot
> 
>       lxc-start 1340194612.762 INFO     lxc_conf - '' hostname has been setup
>       lxc-start 1340194612.792 DEBUG    lxc_conf - mac address '00:50:C2:45:3C:14' on 'eth0' has been setup
>       lxc-start 1340194612.795 DEBUG    lxc_conf - 'eth0' has been setup
>       lxc-start 1340194612.795 INFO     lxc_conf - network has been setup
>       lxc-start 1340194612.795 DEBUG    lxc_conf - mounted '/etc/lxc/testcat0/rootfs' on '/usr/lib/lxc/rootfs'
> 	[...]
>       lxc-start 1340194612.797 INFO     lxc_conf - mount points have been setup
>       lxc-start 1340194612.798 ERROR    lxc_conf - No such file or directory - failed to mount '/cgroup/testcat0' on '/usr/lib/lxc/rootfs/cgroup'  <<-- SHOULD BE /cgroup/lxc/testcat0  HERE ???

How are you asking for this mount to happen?  Can you give your container
config file?

-serge




More information about the lxc-devel mailing list