> On Янв. 13, 2020, 3:21 д.п., Qian Zhang wrote: > > src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp > > Lines 840-841 (patched) > > <https://reviews.apache.org/r/71965/diff/1/?file=2199231#file2199231line855> > > > > 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`.
> How do we know this is a nested container with shared cgroups? `update()` and `usage()` case. Since there is no way to distinguish between a nested container with shared cgroups and a non-existent container, we should return the error message describing the situation: `Unknown container`. This message tells us that the container is unknown to the cgroups isolator. It doesn't state that this container does not exist, nor it states that this is a nested container with shared cgroups. `cleanup()` case. I removed the misleading comment. Also, I made it print VLOG message in any case as it's more accurate. `status()` case. If we are a nested container unknown to the isolator, we try to find the status of its ancestor. This preserves the old behavior. - Andrei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71965/#review219227 ----------------------------------------------------------- On Фев. 12, 2020, 3:47 п.п., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71965/ > ----------------------------------------------------------- > > (Updated Фев. 12, 2020, 3:47 п.п.) > > > 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/2/ > > > Testing > ------- > > > Thanks, > > Andrei Budnik > >
