[lxc-users] sysvinit with cgroup namespace

Serge Hallyn serge.hallyn at ubuntu.com
Wed Apr 6 15:18:13 UTC 2016


Quoting KATOH Yasufumi (karma at jazz.email.ne.jp):
> Hi,
> 
> My desktop is used sysvinit as init.
> 
> I try using the "cgroup namespace", then a lxc container does not
> start.
> 
> Now, If we have '/proc/self/ns/cgroup', then cgfsng is used as cgroup
> driver (in cgfsng_opt_init function). But in all_controllers_found
> function (in cgfsng.c), systemd cgroup ("name=systemd") must be exist.
> 
> But on sysvinit environment, it doesn't exist, so a container is not
> started.
> 
> lxc-start 20160406201046.399 INFO     lxc_cgroup - cgroup.c:cgroup_init:68 - cgroup driver cgroupfs-ng initing for ct01
> lxc-start 20160406201046.400 ERROR    lxc_cgfsng - cgfsng.c:all_controllers_found:431 - no systemd controller mountpoint found
> lxc-start 20160406201046.400 ERROR    lxc_start - start.c:lxc_spawn:1079 - failed initializing cgroup support
> lxc-start 20160406201046.434 ERROR    lxc_start - start.c:__lxc_start:1329 - failed to spawn 'ct01'
> 
> Will we be able to start a container on sysvinit with cgroup namespace
> in the future release?

mkdir /sys/fs/cgroup
mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup

You could argue that this shouldn't be needed, but if you
don't do it you won't be able to start any systemd-based
containers, and I'd rather bail out early with a clear error
and simple fix, rather than get cryptic reports about certain
containers not working.


More information about the lxc-users mailing list