[lxc-devel] lxc0.8 and hierarchies
Ward, David - 0663 - MITLL
david.ward at ll.mit.edu
Wed May 2 15:30:27 UTC 2012
On 02/05/12 10:14, Serge Hallyn wrote:
> Quoting William Dauchy (wdauchy-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org):
>> Hello,
>>
>> I tested lxc0.8 rc1 and saw that cgroups are now created in
>> /cgroup/lxc/, so lxc-create will create the cgroups in this directory
>> as a cgroups hierarchy.
>> It makes the thing unusable when using cgroups capabilities that does
>> not support hierarchies. I'm thinking about CONFIG_NETPRIO_CGROUP in
>> the last 3.3 kernel which only support cgroups created in /cgroup
>> directory.
>> Is it a known issue? or is it planned to configure the directory?
>
> The issue of what to do with control groups which do not support
> hierarchies has been discussed on lkml recently. I thought (though
> maybe I'm wrong) the decision was that such a subsystem would have
> its cgroups available at leaf nodes, i.e. it's /xyz cgroup, if
> composed with a devices cgroup which has /abc/xyz, would be
> visible at /abc/xyz. IIRC one of the primary drivers of the need
> for this was systemd support.
>
> Putting lxc cgroups under lxc/ is the right thing to do to cooperate
> with other programs using cgroups, like libvirt. I don't think we
> should punt on that. Rather, I personally think it's reasonable to say
> that if you are using a cgroup which has max depth 1, you should mount
> it separately. If you then want to use it with lxc, perhaps we should,
> for now have a hack which specifis which cgroups do not support
> hierarchies, and handle them specially?
>
> -serge
Right now lxc is hard-coded to not create a 'lxc/' directory in a cgroup
hierarchy if it contains the (deprecated) 'ns' subsystem. So maybe the
code should also check for the 'netprio' subsystem in the same way?
I'm not sure if this is relevant to your problem, but last month I sent
a patchset that, among other things, fixes lxc to properly handle cgroup
hierarchies that do not contain any subsystems (like systemd):
http://sourceforge.net/mailarchive/forum.php?thread_name=4F6ADBDA.9040400%40free.fr&forum_name=lxc-devel
David
More information about the lxc-devel
mailing list