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

Feature request: a helper for getting an absolute path to the cgroup of a container and a pod #35

Open
askervin opened this issue Mar 20, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@askervin
Copy link
Contributor

Currently NRI plugins can ask the cgroup path of a container using ctr.GetCgroupsPath().

If a plugin needs to access controllers in the cgroup, it will need to implement the magic that converts this relative path into an absolute path in the system. Unfortunately this task is quite prone to errors, because the directory structure may vary quite a bit, depending on the cgroup manager, pod QoS class (when using Kubernetes), and of course custom cgroup hierarchies.

In order to help writing plugins that work everywhere, could the NRI framework provide a way to get an absolute path to the cgroup v2 directory of a pod and of a container? ctr.GetCgroup2AbsPath() or something similar?

@mikebrow mikebrow added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants