]> git.proxmox.com Git - mirror_lxc.git/commit
cgroups: fix broken support for deprecated ns cgroup
authorSerge Hallyn <serge.hallyn@canonical.com>
Mon, 5 Mar 2012 22:53:14 +0000 (23:53 +0100)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Mon, 5 Mar 2012 22:53:14 +0000 (23:53 +0100)
commitfc3c7f7f6e9d8adfc4be943160e4ef902436a25d
tree3e1d49595de6a3f61267b93b10cc98bd83d3b9a0
parent09f2410e846189e765e39685b350255c196637c1
cgroups: fix broken support for deprecated ns cgroup

when using ns cgroup, use /cgroup/<init-cgroup> rather than
/cgroup/<init-cgroup>/lxc

At least lxc-start, lxc-stop, lxc-cgroup, lxc-console and lxc-ls work
with this patch.  I've tested this in a 2.6.35 kernel with ns cgroup,
and in a 3.2 kernel without ns cgroup.

Note also that because of the check for container reboot support,
if we're using the ns cgroup we now end up with a /cgroup/<container>/2
cgroup created, empty, by the clone(CLONE_NEWPID).  I'm really not
sure how much time we want to spend cleaning such things up since
ns cgroup is deprecated in kernel.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/cgroup.c
src/lxc/lxc-ls.in