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




src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
Lines 351 (patched)
<https://reviews.apache.org/r/71965/#comment307385>

    I think we can directly call `cgroup()` instead of 
`CgroupsIsolatorProcess::cgroup()` here, right? Same to the other places where 
we call this method.



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
Line 411 (original), 425 (patched)
<https://reviews.apache.org/r/71965/#comment307387>

    s/root/parent/, see the definition of the field `share_cgroups`: 
https://github.com/apache/mesos/blob/master/include/mesos/v1/mesos.proto#L3335:L3348
 .



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
Lines 434-435 (patched)
<https://reviews.apache.org/r/71965/#comment307386>

    A newline between.



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
Lines 435 (patched)
<https://reviews.apache.org/r/71965/#comment307388>

    Here I think we need a special handling for 2nd level nested containers, 
i.e., for such containers the `share_cgroups` field will be ignored and they 
should always share cgroups from its parent container, see 
https://github.com/apache/mesos/blob/master/include/mesos/v1/mesos.proto#L3340:L3343
 .



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
Line 459 (original), 480 (patched)
<https://reviews.apache.org/r/71965/#comment307394>

    I think now we need to do this for nested containers whose `share_cgroups` 
is false, because they may need to create cgroups under their own nested 
cgroups.



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
Lines 610-614 (original), 634 (patched)
<https://reviews.apache.org/r/71965/#comment307389>

    Linux launcher creates freezer and systemd cgroups with `mesos` as 
separator, but here you use `""` as separator, will that be a problem? Or you 
want to change Linux launcher's code to make it consistent with the code here?



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
Lines 779-785 (original), 797-803 (patched)
<https://reviews.apache.org/r/71965/#comment307390>

    This logic is correct for root container since we will return an `Unknown 
container` failure for it if `infos` does not contain it, but it seems not 
correct for the nested container whose `share_cgroup` is false, for such 
container, if `infos` does not contain it, we will always return a pending 
future but never return the `unknown container` failure, that might hide some 
errors in our code. I think we should also return an `Unknown container` 
failure for the nested container whose `share_cgroup` is false and somehow 
`infos` does not contain it. HDYT?



src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
Lines 840-841 (patched)
<https://reviews.apache.org/r/71965/#comment307391>

    How do we know this is a nested container **with shared cgroups**?
    
    And I have the same comment for the methods `usage`, `status` and `cleanup`.


- Qian Zhang


On Jan. 10, 2020, 5:03 a.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71965/
> -----------------------------------------------------------
> 
> (Updated Jan. 10, 2020, 5:03 a.m.)
> 
> 
> Review request for mesos, Greg Mann and Qian Zhang.
> 
> 
> Bugs: MESOS-10076
>     https://issues.apache.org/jira/browse/MESOS-10076
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds support for nested cgroups for nested containers.
> Nested cgroups are created only for a nested container with explicitly
> enabled `share_cgroups` flag. The cgroups isolator stores info about
> nested cgroups in the `infos` class variable, which is used to
> determine whether a nested container has its nested cgroup.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp 
> 4bd3d6dad37dee031660c15e957cc36f63e21fcb 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 
> b12b73d8e0161d448075378765e77867521de04e 
> 
> 
> Diff: https://reviews.apache.org/r/71965/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>

Reply via email to