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

Fix integrations tests with cgroupv2 #850

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Conversation

Kern--
Copy link
Contributor

@Kern-- Kern-- commented Sep 29, 2023

Issue #, if available:
closes #735

Description of changes:
With cgroupv2, dind doesn't work out of the box because the inner docker process is in the (containerized) root cgroup so it can't create the inner container's cgroups because doing so would make the inner docker a process on an interior cgroup node. cgroupv2 only allows processes on the leaf nodes.

The solution is to move docker to a child cgroup (called init) so that the container can exist as a sibling.

Testing performed:
make check && make integration on an al2023 instance which uses cgroupv2.

Before this change the tests failed with:

ctr: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: cannot enter cgroupv2 "/sys/fs/cgroup/default" with domain controllers -- it is in an invalid state: unknown

after this change, the tests pass

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

With cgroupv2, dind doesn't work out of the box because the inner docker
process is in the (containerized) root cgroup so it can't create the
inner container's cgroups because doing so would make the inner docker a
process on an interior cgroup node. cgroupv2 only allows processes on
the leaf nodes.

The solution is to move docker to a child cgroup (called init) so that
the container can exist as a sibling.

Signed-off-by: Kern Walster <[email protected]>
@Kern-- Kern-- requested a review from a team as a code owner September 29, 2023 23:32
@Kern-- Kern-- merged commit 52bd24d into awslabs:main Oct 2, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

[Bug] Integration tests don't work with cgroupv2
3 participants