Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path of cgroup is wrong when running a container in a container. #237

Open
aa624545345 opened this issue Jan 8, 2024 · 7 comments
Open

Comments

@aa624545345
Copy link
Contributor

https://github.com/containerd/rust-extensions/blob/main/crates/shim/src/cgroup.rs#L195
cgroup-rs

@Burning1020
Copy link
Member

Could you explain the reason more specificlly?

@aa624545345
Copy link
Contributor Author

aa624545345 commented Jan 9, 2024

get_cgroups_relative_paths_by_pid returns wrong cgroup paths because relative paths obtained from /proc/.../cgroup is not the true path, they shoud be trimed with the root path get from the third column of /proc/.../mountinfo.

This error only occurs when running a container in a container, running directly on the host is fine.

A specific description can be found here: kata-containers/cgroups-rs#131.

@aa624545345
Copy link
Contributor Author

aa624545345 commented Jan 9, 2024

If cgroup-rs library remains unchanged, it is possible because for kata containers, they may not have a requirement for running a container withina container. In that case, would the rust-extentions consider fixing this bug?

Bug fix for cgroup-rs is here: https://github.com/kata-containers/cgroups-rs/pull/132/commits

@aa624545345
Copy link
Contributor Author

@Burning1020 @kzys @dims @caniszczyk Hi, cgroups-rs seems have no intention to fix this bug. The issue i rased in cgroup-rs haven't received reponse for a month. Are you intrerested in fixing it? I can submit a new pr, collect the cgroup paths after here.

@Burning1020
Copy link
Member

@aa624545345 Hi, I notice you have committed a PR to cgroup-rs and I think it should be fixed in it because cgroup-rs is a public crate not only used in kata-containers.

@Mossaka
Copy link
Member

Mossaka commented Mar 28, 2024

I noticed there are fairly amount of activities on Kata containers slack channel so I reached out to them, hopefully I could draw attention to get some feedback for your PR, @aa624545345.

https://katacontainers.slack.com/archives/C879ACQ00/p1711667146047859

@aa624545345
Copy link
Contributor Author

I noticed there are fairly amount of activities on Kata containers slack channel so I reached out to them, hopefully I could draw attention to get some feedback for your PR, @aa624545345.

https://katacontainers.slack.com/archives/C879ACQ00/p1711667146047859

Oh, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants