Subject: Re: [vserver] Default CGROUP_SUBSYS needs to exclude "ns"
From: "Daniel Hokka Zakrisson" <daniel@hozac.com>
Date: Thu, 25 Feb 2010 17:10:53 +0100 (CET)

ben@bristolwireless.net wrote:
> Hi all,
>
> I've found that the default mounted cgroup subsystem in util-vserver
> init script are set by the variable CGROUP_SUBSYS. It is currently set
> to "all" by default. I've also noticed that on kernels with
> CONFIG_CGROUP_NS=y this mean that the "ns", meaning guests can't be run.

Right, I've been meaning to change that, just haven't gotten around to it.
Should be fixed in the next pre.

> IMHO the default subsystems mounted should be all those present on the
> system, excluding ns, so that Linux-Vserver may work on the widest
> range of kernels. I wrote a script to set CGROUP_SUBSYS correctly in
> the default case. My BASH is probably embarrassingly bad, but it gets
> the job done, creating a comma separated list of subsystems:
>
> #default to using all cgroup subsystems excluding ns
> for SYS in `cat /proc/cgroups | grep -v subsys_name | grep -v ns | awk
> '{print $1}'` ; do
> if [ "${CGROUP_SUBSYS}" = "" ] ; then
> CGROUP_SUBSYS=${SYS}
> else
> CGROUP_SUBSYS="${CGROUP_SUBSYS},${SYS}"
> fi
> done
>
>
> Cheers,
> ==
>  From Ben Green

-- 
Daniel Hokka Zakrisson