[lxc-users] sysvinit with cgroup namespace
serge.hallyn at ubuntu.com
Wed Apr 6 15:20:38 UTC 2016
Quoting KATOH Yasufumi (karma at jazz.email.ne.jp):
> Sorry, I ran old version (2.0.0.rc7).
> > 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?
> I tried 2.0.0.rc15.
> I can't start a container with sysvinit regardless of whether cgroup
> namespace is used.
> lxc-start 20160406212027.095 INFO lxc_cgroup - cgroup.c:cgroup_init:72 - cgroup driver cgroupfs-ng initing for ct01
> lxc-start 20160406212027.096 ERROR lxc_cgfsng - cgfsng.c:all_controllers_found:431 - no systemd controller mountpoint found
> lxc-start 20160406212027.096 ERROR lxc_start - start.c:lxc_spawn:1079 - failed initializing cgroup support
> lxc-start 20160406212027.136 ERROR lxc_start - start.c:__lxc_start:1329 - failed to spawn 'ct01'
> lxc-start 20160406212027.136 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - command get_cgroup failed to receive response
> lxc-start 20160406212032.141 ERROR lxc_start_ui - lxc_start.c:main:344 - The container failed to start.
> lxc-start 20160406212032.141 ERROR lxc_start_ui - lxc_start.c:main:346 - To get more details, run the container in foreground mode.
> lxc-start 20160406212032.141 ERROR lxc_start_ui - lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.
> I read src/lxc/cgroup.c. At this version, I suppose that cgfsng driver
> needs systemd, and cgroup_ops_init function always call
> cgfsng_ops_init and always return cgfsng_ops when cgmanager is not used.
> I guess sysvinit need cgfs driver when without cgmanager, but not
> used. Will cgfs driver is called when any conditions?
cgfs driver is called when cgfsng fails. cgfsng will fail if it
cannot find a needed writeable subsystem. So in your case it
*should* actually be trying both cgfsng and then cgfs.
More information about the lxc-users