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
Handle threaded cgroup types #4168
base: main
Are you sure you want to change the base?
Conversation
Can we have an integration test? |
@AkihiroSuda what do you mean by integration test? Should I do something on my side? |
These tests
Yes, please. |
Here is the integration test result:
I don't know why some tests failed but I run them on branch v1.1.10 too and got the same error, so it doesn't seem related to the patch. Best, |
@Bacto please squash your commits. |
fa31d79
to
c263e73
Compare
Signed-off-by: Bacto <adrien@bacto.net>
Rebased to latest HEAD to get CI fixes |
We still don't have the integration test :( |
So, I think the way the code should work is try to read cgroup.procs and if there's "operation not supported" error, switch to cgroup.threads. This way it is faster than reading an extra file (cgroup.type). |
CgroupType = "cgroup.type" | ||
CgroupProcesses = "cgroup.procs" | ||
CgroupThreads = "cgroup.threads" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are using public names here. Do you want to use these constants from other packages?
There are couple of linter issues to be addressed as well. |
- NOTE: This isn't everything! Just enough to run `gnd` on a really modified diego-cell instance. There are still failing tests in these packages: gqt ./gqt gqt_cleanup ./gqt_cleanup gqt_setup ./gqt_setup nerd ./rundmc/runcontainerd/nerd throttle ./throttle - In general, it seems like cgroups v2 does not require us to mount the cgroup or subelements (like `devices` `blkio`) in order to actually use the cgroup - We also needed to apply a patch from a PR to the lastest runC source code in order to avoid the failure on `runc exec` - Looks like it tried to read cgroups.procs but those don't always exist when runc is running in a threaded-mode. - See this PR for more context: - opencontainers/runc#4168 [#187184163](https://www.pivotaltracker.com/story/show/187184163) Signed-off-by: Maria Shaldybin <maria.shaldybin@broadcom.com>
@Bacto please let us know if you want to keep working on this. |
Resolve #3821