]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Remount cgroups controllers after setting up new /sys in LXC
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 11 May 2012 16:26:48 +0000 (17:26 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 16 May 2012 10:37:40 +0000 (11:37 +0100)
commita8c0b2fed02e49d33915d7fa762e8f35fd07d815
tree59cb179ba73c4970ed16a6d5a7dabc094f0acee4
parentc529b47a756960d332fbe9903943dae855e7b949
Remount cgroups controllers after setting up new /sys in LXC

Normal practice is for cgroups controllers to be mounted at
/sys/fs/cgroup. When setting up a container, /sys is mounted
with a new sysfs instance, thus we must re-mount all the
cgroups controllers. The complexity is that we must mount
them in the same layout as the host OS. ie if 'cpu' and 'cpuacct'
were mounted at the same location in the host we must preserve
this in the container. Also if any controllers are co-located
we must setup symlinks from the individual controller name to
the co-located mount-point

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_container.c
src/util/cgroup.h