-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75156/#review226802
-----------------------------------------------------------


Ship it!





src/slave/containerizer/mesos/paths.cpp
Lines 710-716 (patched)
<https://reviews.apache.org/r/75156/#comment315108>

    a `for (int i = 0; i < root_tokens.size(); ++i)` loop seems simpler?


- Benjamin Mahler


On Aug. 9, 2024, 12:58 a.m., Jason Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75156/
> -----------------------------------------------------------
> 
> (Updated Aug. 9, 2024, 12:58 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently, CgroupsIsolatorTest.ROOT_CGROUPS_PERF_PerfForward fails
> during recovery because it cannot create the directory for the recovered
> container. This happens because the original containerId, when
> recovered, includes the cgroup root. The function that converts a cgroup
> to a containerId does not ignore the cgroup root, even though we do not
> expect it to be included.
> 
> To fix this, we will remove the first token of the cgroup if it matches
> the cgroup root. This will prevent attaching an extraneous cgroup root
> to the containerId when parsing it from a cgroup.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/paths.hpp 
> 6acd72363743df8aca57da774f7ff5b288b3c4a4 
>   src/slave/containerizer/mesos/paths.cpp 
> 1269502794b14fa3683afb984ac3ae226f9ac5d5 
>   src/tests/containerizer/mesos_containerizer_paths_tests.cpp 
> 45afc8465470b8f4471acff5849cdbfd3780a852 
> 
> 
> Diff: https://reviews.apache.org/r/75156/diff/2/
> 
> 
> Testing
> -------
> 
> ROOT_CGROUPS_PERF_PerfForward test now passes. Added some new test cases to 
> CGROUPS2_Cgroups2ParsePaths that would fail without this fix. Many test cases 
> in CGROUPS2_Cgroups2ParsePaths only passed because they used "mesos" as the 
> root which happened to be the same as the CGROUP_SEPARATOR.
> 
> 
> Thanks,
> 
> Jason Zhou
> 
>

Reply via email to