[ 
https://issues.apache.org/jira/browse/MESOS-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yan Xu updated MESOS-1083:
--------------------------

    Description: 
The 
[SetUpTestCase()|https://github.com/apache/mesos/blob/1a141e684dcb1ddfb0fe13e89dfccca24770e59a/src/tests/cgroups_tests.cpp#L64]
 and 
[TearDownTestCase()|https://github.com/apache/mesos/blob/1a141e684dcb1ddfb0fe13e89dfccca24770e59a/src/tests/cgroups_tests.cpp#L69]
 methods in CgroupsTest weren't updated for the contrainerizer change, after 
which {{TEST_CGROUPS_HIERARCHY}} is no longer a hierarchy but the parent dir of 
multiple hierarchies. ({{TEST_CGROUPS_HIERARCHY}} should probably be more aptly 
named {{TEST_CGROUPS_BASE_HIERARCHY}} or {{TEST_CGROUPS_HIERARCHY_BASE}})

Therefore {{cgroups::cleanup(TEST_CGROUPS_HIERARCHY)}} no longer makes sense 
and it causes the following error:

{code}
[       OK ] CgroupsAnyHierarchyWithCpuMemoryFreezerTest.ROOT_CGROUPS_Freeze 
(13 ms)

// Tearing down CgroupsAnyHierarchyWithCpuMemoryFreezerTest

../../src/tests/cgroups_tests.cpp:69: Failure
(cgroups::cleanup(TEST_CGROUPS_HIERARCHY)).failure(): Operation not permitted
{code}

The error "Operation not permitted" is due to cleanup() being confused when the 
argument isn't actually a hierarchy.

  was:
The SetUpTestCase() and TearDownTestCase() methods in CgroupsTest weren't 
updated for the contrainerizer change, after which `TEST_CGROUPS_HIERARCHY` is 
no longer a hierarchy but the parent dir of multiple hierarchies. 
(`TEST_CGROUPS_HIERARCHY` should probably be more aptly named 
`TEST_CGROUPS_BASE_HIERARCHY` or `TEST_CGROUPS_HIERARCHY_BASE`)

Therefore `cgroups::cleanup(TEST_CGROUPS_HIERARCHY)` no longer makes sense and 
it causes the following error:

[       OK ] CgroupsAnyHierarchyWithCpuMemoryFreezerTest.ROOT_CGROUPS_Freeze 
(13 ms)

// Tearing down CgroupsAnyHierarchyWithCpuMemoryFreezerTest

../../src/tests/cgroups_tests.cpp:69: Failure
(cgroups::cleanup(TEST_CGROUPS_HIERARCHY)).failure(): Operation not permitted

The error "Operation not permitted" is due to cleanup() being confused when the 
argument isn't actually a hierarchy.


> Error in CgroupsTest::SetUpTestCase() and TearDownTestCase()
> ------------------------------------------------------------
>
>                 Key: MESOS-1083
>                 URL: https://issues.apache.org/jira/browse/MESOS-1083
>             Project: Mesos
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 0.18.0
>         Environment: Linux
>            Reporter: Yan Xu
>            Assignee: Yan Xu
>             Fix For: 0.19.0
>
>
> The 
> [SetUpTestCase()|https://github.com/apache/mesos/blob/1a141e684dcb1ddfb0fe13e89dfccca24770e59a/src/tests/cgroups_tests.cpp#L64]
>  and 
> [TearDownTestCase()|https://github.com/apache/mesos/blob/1a141e684dcb1ddfb0fe13e89dfccca24770e59a/src/tests/cgroups_tests.cpp#L69]
>  methods in CgroupsTest weren't updated for the contrainerizer change, after 
> which {{TEST_CGROUPS_HIERARCHY}} is no longer a hierarchy but the parent dir 
> of multiple hierarchies. ({{TEST_CGROUPS_HIERARCHY}} should probably be more 
> aptly named {{TEST_CGROUPS_BASE_HIERARCHY}} or 
> {{TEST_CGROUPS_HIERARCHY_BASE}})
> Therefore {{cgroups::cleanup(TEST_CGROUPS_HIERARCHY)}} no longer makes sense 
> and it causes the following error:
> {code}
> [       OK ] CgroupsAnyHierarchyWithCpuMemoryFreezerTest.ROOT_CGROUPS_Freeze 
> (13 ms)
> // Tearing down CgroupsAnyHierarchyWithCpuMemoryFreezerTest
> ../../src/tests/cgroups_tests.cpp:69: Failure
> (cgroups::cleanup(TEST_CGROUPS_HIERARCHY)).failure(): Operation not permitted
> {code}
> The error "Operation not permitted" is due to cleanup() being confused when 
> the argument isn't actually a hierarchy.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to