----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65350/#review200131 -----------------------------------------------------------
Thanks for all efforts on this issue, Andrei. However, adding a mutex lock does not seem a clean fix to me. Please see my comment for details https://issues.apache.org/jira/browse/MESOS-8489?focusedCommentId=16417999&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16417999 - Gilbert Song On March 12, 2018, 7:50 a.m., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65350/ > ----------------------------------------------------------- > > (Updated March 12, 2018, 7:50 a.m.) > > > Review request for mesos, Alexander Rukletsov, Gilbert Song, Jie Yu, and Till > Toenshoff. > > > Bugs: MESOS-8489 > https://issues.apache.org/jira/browse/MESOS-8489 > > > Repository: mesos > > > Description > ------- > > This patch modifies `cgroup::prepare` function to save the results of > a test for a nested cgroups support in a hashmap to reuse it in the > future. > > Besides optimization, this patch fixes flaky > `LinuxCapabilitiesIsolatorFlagsTest.ROOT_IsolatorFlags` test. There > was a race condition between two starting agents, where the first > agent could detect `test` orphaned container while iterating over > `/sys/fs/cgroup/freezer/mesos/` cgroup, because the second agent > is calling `cgroup::prepare` during its initialization. This patch > fixes the test, because it won't create a `test` cgroup in > `cgroups::prepare` as this test has already been passed during the > initialization of the first agent and the result is stored in hashmap. > > > Diffs > ----- > > src/linux/cgroups.cpp 682b288da8d56a623ef32cf6f0beecd9fc327622 > > > Diff: https://reviews.apache.org/r/65350/diff/2/ > > > Testing > ------- > > sudo make check (Fedora 25) > internal CI > > > Thanks, > > Andrei Budnik > >
