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

Backport of Fix DevicesSets being removed when cpusets are reloaded with cgroup v2 into release/1.3.x #17550

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #17535 to be assessed for backporting due to the inclusion of the label backport/1.3.x.

The below text is copied from the body of the original PR.


This meant that if any allocation was created or removed, all active DevicesSets were removed from all cgroups of all tasks.

This was most noticeable with "exec" and "raw_exec", as it meant they no longer had access to /dev files.

Fixes #12877, and possibly a bunch of other related but different reports in the issue tracker. See #12877 (comment) for steps how to reproduce this problem, and validate it is actually fixed with this change. Most important piece of context: https://github.com/opencontainers/runc/blob/5cf9bb229feed19a767cbfdf9702f6487341e29e/libcontainer/cgroups/devices/v2.go#L55-L57

Few warnings:

  • 4 hours ago I had no idea how cgroups worked, nor how BPF and DevicesSets interacted with cgroups
  • 1 hour ago I never touched a Go project in my life (but a long history of other languages, so "its fine")

PS: I checked if there were any e2e tests this could be part of; but it seems there is nothing there yet, neither for cgroup or cpuset. If I missed it, please let me know.

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/skip-devices-when-doing-cpusets/easily-huge-stingray branch from f36c86c to 8552ac7 Compare June 15, 2023 14:39
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 8f6ed57 into release/1.3.x Jun 15, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/skip-devices-when-doing-cpusets/easily-huge-stingray branch from 6238c8e to 50488ac Compare June 15, 2023 14:39
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/skip-devices-when-doing-cpusets/easily-huge-stingray branch June 15, 2023 14:39
@vercel vercel bot temporarily deployed to Preview – nomad June 15, 2023 14:44 Inactive
@vercel vercel bot temporarily deployed to Preview – nomad-storybook-and-ui June 15, 2023 14:48 Inactive
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.

None yet

3 participants