You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jason Zhou <ja...@gmail.com> on 2024/05/20 20:54:02 UTC

Re: Review Request 75003: [cgroups2] fix containerizer::paths::cgroups2::container

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

(Updated May 20, 2024, 8:54 p.m.)


Review request for mesos and Benjamin Mahler.


Summary (updated)
-----------------

[cgroups2] fix containerizer::paths::cgroups2::container


Repository: mesos


Description
-------

It seems that the container IDs retrieved through cgroups2::get have
their roots attached to their IDs. As such, when putting them through
the container function, we inadvertently joined the root with another root,
resulting in a path that looks like <root>/<root>/<separator>/<id1>...
When it is supposed to look like <root>/<id1>.

We do this by removing the top level of the container ID if it matches
the given root, so that we won't have an issue when joining the root back
at the end of the function.


Diffs (updated)
-----

  src/slave/containerizer/mesos/paths.cpp 1269502794b14fa3683afb984ac3ae226f9ac5d5 
  src/tests/containerizer/mesos_containerizer_paths_tests.cpp 45afc8465470b8f4471acff5849cdbfd3780a852 


Diff: https://reviews.apache.org/r/75003/diff/2/

Changes: https://reviews.apache.org/r/75003/diff/1-2/


Testing
-------


Thanks,

Jason Zhou


Re: Review Request 75003: [cgroups2] fix containerizer::paths::cgroups2::container

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75003/#review226468
-----------------------------------------------------------



Bad patch!

Reviews applied: [75003]

Failed command: cd .. && /usr/bin/python3 support/apply-reviews.py -n -r 75003

Error:
2024-05-20 23:09:06 URL:https://reviews.apache.org/r/75003/diff/raw/ [2574/2574] -> "75003.patch" [1]
Committer identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <je...@ip-172-31-29-145.eu-west-3.compute.internal>) not allowed

Full log: https://ci-builds.apache.org/job/Mesos/job/Mesos-Reviewbot/32306/console

- Mesos Reviewbot


On May 20, 2024, 8:54 p.m., Jason Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75003/
> -----------------------------------------------------------
> 
> (Updated May 20, 2024, 8:54 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> It seems that the container IDs retrieved through cgroups2::get have
> their roots attached to their IDs. As such, when putting them through
> the container function, we inadvertently joined the root with another root,
> resulting in a path that looks like <root>/<root>/<separator>/<id1>...
> When it is supposed to look like <root>/<id1>.
> 
> We do this by removing the top level of the container ID if it matches
> the given root, so that we won't have an issue when joining the root back
> at the end of the function.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/paths.cpp 1269502794b14fa3683afb984ac3ae226f9ac5d5 
>   src/tests/containerizer/mesos_containerizer_paths_tests.cpp 45afc8465470b8f4471acff5849cdbfd3780a852 
> 
> 
> Diff: https://reviews.apache.org/r/75003/diff/2/
> 
> 
> Testing
> -------
> 
> Added to the CGROUPS2_Cgroups2Paths test case which will fail without these changes. The new test cases reflect the type of containerIds we get when testing, where the containerIds' final ancestor is the root.
> 
> 
> Thanks,
> 
> Jason Zhou
> 
>