----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42618/#review117243 -----------------------------------------------------------
src/slave/containerizer/mesos/isolators/cgroups/net_cls.hpp (lines 38 - 39) <https://reviews.apache.org/r/42618/#comment178408> What do we need this? Should we expose that using agent flags. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 282 - 294) <https://reviews.apache.org/r/42618/#comment178368> I would pull this into a helper function in src/linux/cgroup.hpp|cpp ``` Try<uint32_t> cgroups::net_cls::classid(hierachy, cgroup); ``` This can be in a separate patch. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 285 - 286) <https://reviews.apache.org/r/42618/#comment178372> Please align the error message accordingly. ``` return Failure( "Unable to ..." + stringify(...)); ``` src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 292 - 293) <https://reviews.apache.org/r/42618/#comment178373> Ditto here. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 300 - 301) <https://reviews.apache.org/r/42618/#comment178376> Ditto on alignment. Do you also need to clear 'infos' to be consistent? src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 329 - 334) <https://reviews.apache.org/r/42618/#comment178377> For known orphans, you want to recovery the classid as well. Otherwise, those handles will be allocated to others while the known orphan containers are still using it. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 413) <https://reviews.apache.org/r/42618/#comment178378> s/netHandle/handle/ src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 418) <https://reviews.apache.org/r/42618/#comment178379> We typically put '+' at the end of the previous line. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 440 - 443) <https://reviews.apache.org/r/42618/#comment178403> Can you try to see if writing a decimal number if fine as well? If not, we should move the helper function into cpp as a file local helper. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 454) <https://reviews.apache.org/r/42618/#comment178404> s/allocate/write/ src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 457 - 458) <https://reviews.apache.org/r/42618/#comment178405> Ditto on error message alignment. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 491 - 497) <https://reviews.apache.org/r/42618/#comment178406> I don't think this is necessary. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (lines 499 - 503) <https://reviews.apache.org/r/42618/#comment178407> You should do this after the cgroup has been destroyed. - Jie Yu On Jan. 31, 2016, 8:06 p.m., Avinash sridharan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42618/ > ----------------------------------------------------------- > > (Updated Jan. 31, 2016, 8:06 p.m.) > > > Review request for mesos and Jie Yu. > > > Bugs: MESOS-4345 > https://issues.apache.org/jira/browse/MESOS-4345 > > > Repository: mesos > > > Description > ------- > > The `NetClsHandleMgr` will be responsible for keeping track of the net_cls > handles that will be used by the net_cls cgroup subsystem. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/cgroups/net_cls.hpp > b4bc52114389d1c1efce2830f4292bd89bb0de7c > src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp > ddc1bf0939e5e8995e6f34fe7b8509b51704f63e > > Diff: https://reviews.apache.org/r/42618/diff/ > > > Testing > ------- > > make and make check > > > Thanks, > > Avinash sridharan > >