----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51631/#review147806 -----------------------------------------------------------
src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp (line 99) <https://reviews.apache.org/r/51631/#comment215089> Suggest to change to: ``` This `hashset` stores the name of subsystems which are recovered or prepared for the container. ``` src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 290 - 291) <https://reviews.apache.org/r/51631/#comment215090> I do not think we need this comment because I think if recover fails, the agent will exit, so we do not have chance (or actually do not need) to do any cleanup. src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 402 - 405) <https://reviews.apache.org/r/51631/#comment215075> Why moving these code here? Can you please let me know what is the problem if we still keep these code in its original location? src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 475 - 481) <https://reviews.apache.org/r/51631/#comment215077> Here we may assign pid to cgroup for a single hierarchy multiple times. For example, in the case of CPU: ``` /cgroup/cpu,cpuacct -> cpu /cgroup/cpu,cpuacct -> cpuacct ``` With your logic here, we will call `cgroups::assign()` twice for the hierarchy `/cgroup/cpu,cpuacct`. src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 733 - 739) <https://reviews.apache.org/r/51631/#comment215078> Ditto, here we may destroy the single hierarchy multiple times. - Qian Zhang On Sept. 6, 2016, 12:06 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51631/ > ----------------------------------------------------------- > > (Updated Sept. 6, 2016, 12:06 a.m.) > > > Review request for mesos, Gilbert Song, Jie Yu, and Qian Zhang. > > > Bugs: MESOS-6063 > https://issues.apache.org/jira/browse/MESOS-6063 > > > Repository: mesos > > > Description > ------- > > Recover newly added cgroups subsystems on existing containers would > fail, and continue to perform the `update` and other operations of > the newly added subsystems on them don't make sense. This patch add > the tracking for the recovered or prepared cgroups subsystems of a > container and skip performing unnecessary subsystem operations on the > container if the subsystem is never recovered or prepared. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp > 38d1428f5425566502747d2a8394e246e0b3fd9e > src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp > 8bab3f15d10c49f223a09eecd5f15e6a13bdac88 > > Diff: https://reviews.apache.org/r/51631/diff/ > > > Testing > ------- > > > Thanks, > > haosdent huang > >
