[vserver] Default CGROUP_SUBSYS needs to exclude "ns"

From: <ben_at_bristolwireless.net>
Date: Thu 25 Feb 2010 - 13:18:08 GMT
Message-ID: <20100225131808.159617jizc5buikg@slackmail.co.uk>

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.

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

Received on Thu Feb 25 13:18:26 2010
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 25 Feb 2010 - 13:18:27 GMT by hypermail 2.1.8