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

Migrate from containerd/cgroups to opencontainers/runc/libcontainer/cgroups #530

Closed
dtrudg opened this issue Jan 26, 2022 · 1 comment · Fixed by #531
Closed

Migrate from containerd/cgroups to opencontainers/runc/libcontainer/cgroups #530

dtrudg opened this issue Jan 26, 2022 · 1 comment · Fixed by #531
Assignees
Labels

Comments

@dtrudg
Copy link
Member

dtrudg commented Jan 26, 2022

Type of issue
technical debt

Description of issue

At present we call into the containerd/cgroups module to use its cgroups manager code. This code is less actively developed than opencontainers/runc/libcontainer/cgroups, and lacks functionality which would ease us:

Note that though runc/libcontainer is considered to be mostly 'internal' code, and not for public consumption, the cgroups portions are the exception. These are used by kubernetes, podman, etc. and will stay public as described in opencontainers/runc#3028

I believe that converting from containerd/cgroups to opencontainers/runc/libcontainer/cgroups should be a step taken before pursuing #299 and #300. To accomplish particularly #300 with containerd/cgroups is not trivial. There is no user systemd manager related code in the module, so we would need to perform dbus comms with systemd to establish an initial user slice/scope ourselves. The libcontainer code already includes what we need: https://github.com/opencontainers/runc/blob/master/libcontainer/cgroups/systemd/user.go

Note that our cgroups spec format mirrors LinuxResources from opencontainers/runtime-spec/specs-go and there is translation code to the runc internal config format in runc, which we can use as a starting point:

https://github.com/opencontainers/runc/blob/5fb9b2a006725d468381de8d300bb9baecc726f7/update.go#L137

@dtrudg dtrudg self-assigned this Jan 26, 2022
@dtrudg dtrudg added this to the SingularityCE 3.10 milestone Jan 26, 2022
@tri-adam
Copy link
Member

Seems reasonable and well thought out to me, @dtrudg. Would love to see this in 3.10.

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

Successfully merging a pull request may close this issue.

2 participants