On Tue, May 31, 2011 at 5:38 PM, Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@canonical.com">serge.hallyn@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="h5">Quoting Daniel Lezcano (<a href="mailto:daniel.lezcano@free.fr">daniel.lezcano@free.fr</a>):<br>
> On 05/31/2011 01:44 PM, Ramez Hanna wrote:<br>
> > On Tue, May 31, 2011 at 2:07 PM, Daniel Lezcano<<a href="mailto:daniel.lezcano@free.fr">daniel.lezcano@free.fr</a>>wrote:<br>
> ><br>
> >> On 05/31/2011 12:33 PM, Ramez Hanna wrote:<br>
> >><br>
> >>> it seems that lxc cannot handle cgroups when capabilities are not all in<br>
> >>> the<br>
> >>> same mount<br>
> >>> it fails now because it cannot write the devices.deny in the cgroup<br>
> >>> if i comment out all the lxc.cgroup.devices lines in the config of the<br>
> >>> container then i can actually start it<br>
> >>><br>
> >>> I would think that the way lxc identifies the cgroup mount might be the<br>
> >>> part<br>
> >>> that needs patching<br>
> >>><br>
> >> Thanks for investigating.<br>
> >><br>
> >> The main problem is lxc is cgroup agnostic, so we should find a solution<br>
> >> where we don't break that.<br>
> >><br>
> >> Maybe one solution would be to collect all the mount points found for the<br>
> >> cgroup and try to find the right path when writing or reading from one<br>
> >> cgroup file.<br>
> >><br>
> > that is what i had in mind, tried looking into the code but my C skills are<br>
> > next to zero<br>
> ><br>
> >> Does systemd run lxc within a cgroup which is not the root cgroup ?<br>
> >><br>
> >> the lxc-start command would run under $user/master/<br>
> > (/sys/fs/cgroup/systemd/$user/$master)<br>
> > and the container itself would run under $container_name<br>
> > (/sys/fs/cgroup/systemd/$container_name)<br>
> > so it would run the container in the root cgroup<br>
><br>
> ouch ! I have to install systemd on a test machine to check how systemd<br>
> plays with the cgroup.<br>
> I don't think the cgroup created by lxc should escape the cgroup the<br>
> command is assigned to.<br>
<br>
</div></div>Another similar - and easier to setup - thing we need to address is running<br>
on a system with libcgroup installed.<br>
<br>
For both, I assume it'll basically come down to:<br>
<br>
1. figure out the path of the cgroup we are in for each cgroup we care<br>
about<br>
2. create new child cgroup for ourselves in each of the above paths whic<br>
is unique<br>
3. track those through the lifetime of the container<br>
<br>
So it just slightly complicates what's being done now.<br>
<font color="#888888"><br>
-serge<br>
</font></blockquote>how does libcgroup change things? does it also mount cgroup on different points ?<br>