[
https://issues.apache.org/jira/browse/MESOS-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yan Xu updated MESOS-6422:
--
Description:
We currently do the following in
[CgroupsTest::TearDownTestCase()|https://github.com/apache/mesos/blob/5e850a362edbf494921fedff4037cf4b53088c10/src/tests/containerizer/cgroups_tests.cpp#L83]
{code:title=}
static void TearDownTestCase()
{
AWAIT_READY(cgroups::cleanup(TEST_CGROUPS_HIERARCHY));
}
{code}
One of its derived test {{CgroupsNoHierarchyTest}} treats
{{TEST_CGROUPS_HIERARCHY}} as a hierarchy so it's able to clean it up as a
hierarchy.
However another derived test {{CgroupsAnyHierarchyTest}} would create new
hierarchies (if none is available) using {{TEST_CGROUPS_HIERARCHY}} as a parent
directory (i.e., base hierarchy) and not as a hierarchy, so when it's time to
clean up, it fails:
{noformat:title=}
[ OK ] CgroupsAnyHierarchyTest.ROOT_CGROUPS_Subsystems (1 ms)
../../src/tests/containerizer/cgroups_tests.cpp:88: Failure
(cgroups::cleanup(TEST_CGROUPS_HIERARCHY)).failure(): Operation not permitted
{noformat}
was:
We currently do the following in
[CgroupsTest::TearDownTestCase()|https://github.com/apache/mesos/blob/5e850a362edbf494921fedff4037cf4b53088c10/src/tests/containerizer/cgroups_tests.cpp#L83]
{code:title=}
static void TearDownTestCase()
{
AWAIT_READY(cgroups::cleanup(TEST_CGROUPS_HIERARCHY));
}
{code}
One of its derived test {{CgroupsNoHierarchyTest}} treats
{TEST_CGROUPS_HIERARCHY} as a hierarchy so it's able to clean it up as a
hierarchy.
However another derived test {{CgroupsAnyHierarchyTest}} would create new
hierarchies (if none is available) using {{TEST_CGROUPS_HIERARCHY}} as a parent
directory (i.e., base hierarchy) and not as a hierarchy, so when it's time to
clean up, it fails:
{noformat:title=}
[ OK ] CgroupsAnyHierarchyTest.ROOT_CGROUPS_Subsystems (1 ms)
../../src/tests/containerizer/cgroups_tests.cpp:88: Failure
(cgroups::cleanup(TEST_CGROUPS_HIERARCHY)).failure(): Operation not permitted
{noformat}
> cgroups_tests not correctly tearing down testing hierarchies
>
>
> Key: MESOS-6422
> URL: https://issues.apache.org/jira/browse/MESOS-6422
> Project: Mesos
> Issue Type: Bug
> Components: containerization
>Reporter: Yan Xu
>
> We currently do the following in
> [CgroupsTest::TearDownTestCase()|https://github.com/apache/mesos/blob/5e850a362edbf494921fedff4037cf4b53088c10/src/tests/containerizer/cgroups_tests.cpp#L83]
> {code:title=}
> static void TearDownTestCase()
> {
> AWAIT_READY(cgroups::cleanup(TEST_CGROUPS_HIERARCHY));
> }
> {code}
> One of its derived test {{CgroupsNoHierarchyTest}} treats
> {{TEST_CGROUPS_HIERARCHY}} as a hierarchy so it's able to clean it up as a
> hierarchy.
> However another derived test {{CgroupsAnyHierarchyTest}} would create new
> hierarchies (if none is available) using {{TEST_CGROUPS_HIERARCHY}} as a
> parent directory (i.e., base hierarchy) and not as a hierarchy, so when it's
> time to clean up, it fails:
> {noformat:title=}
> [ OK ] CgroupsAnyHierarchyTest.ROOT_CGROUPS_Subsystems (1 ms)
> ../../src/tests/containerizer/cgroups_tests.cpp:88: Failure
> (cgroups::cleanup(TEST_CGROUPS_HIERARCHY)).failure(): Operation not permitted
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)