> On May 30, 2014, 4:17 p.m., Jie Yu wrote:
> > src/linux/cgroups.cpp, lines 454-463
> > <https://reviews.apache.org/r/21799/diff/1/?file=587746#file587746line454>
> >
> >     Hum, what if the user specify '--slave_subsystems=cpu,cpuacct' on the 
> > command line? IIUC, the 'prepare' function will be called twice: one for 
> > 'cpu' and one for 'cpuacct', and one of them will fail?
> 
> Timothy St. Clair wrote:
>     Right now they already mounted by systemd, and the logic here check to 
> see if they are co-mounted.  This simply adds the exception to allow the case 
> when: 
>     
>     export MESOS_isolation='cgroups/cpu,cgroups/mem'
>     export MESOS_hierarchy=/sys/fs/cgroup
>     
>     I don't think we want mesos to do the co-mounting explicitly...
>     
>     
>
> 
> Jie Yu wrote:
>     My concern here is, what if the user specify the following:
>     
>     export MESOS_slave_subsystems=cpu,cpuacct,memory
>     
>     Will the slave fail to start? More specifically, will the 'prepare' call 
> for cpuacct fail because the slave cannot mount cpuacct subsystem to 
> /sys/fs/cgroup/cpuacct as it is already mounted at /sys/fs/cgroup/cpu? I know 
> that it won't work right now with systemd, but since you are addressing this 
> issue, can you fix this as well (maybe in a difference review).
> 
> Timothy St. Clair wrote:
>     I'll take a look today.

So the logic for the exception is *only* in the case where it's already 
co-mounted.  All the existing logic holds for mounting.

if (mounted.get()) {
   // Existing logic + 
   // don't fail on co-mount of cpu+cpuacct.
}
else {
   // same mounting semantics. 
}

So I think we are fine.  


- Timothy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21799/#review44370
-----------------------------------------------------------


On June 3, 2014, 1:39 a.m., Timothy St. Clair wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21799/
> -----------------------------------------------------------
> 
> (Updated June 3, 2014, 1:39 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ian Downes, and Jie Yu.
> 
> 
> Bugs: MESOS-1195
>     https://issues.apache.org/jira/browse/MESOS-1195
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Fixes to enable cgroups to function when initialized via systemd defaults:
> + Fix for co-mounting cpu,cpuacct
> + Fix for nested cgroups_root='system.slice/mesos-slave.service' 
> + Diagnostics to propagate error details.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 21d87a0 
>   src/linux/cgroups.cpp 142ac43 
>   src/slave/containerizer/isolators/cgroups/mem.cpp f2509ad 
> 
> Diff: https://reviews.apache.org/r/21799/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Timothy St. Clair
> 
>

Reply via email to