Support `LinuxDeviceCgroup` updates
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, go, linux
- Domain
- cli, operating-systems
Research direction
Start with update.go around the existing config.Cgroups.SkipDevices handling and trace config.Cgroups.Resources.Devices. Compare that path with CreateCgroupConfig and the device-update discussion in #2366 and PR #2951. Done means the update command has explicitly defined semantics for replacing or applying device rules and supports the required cgroup(v2) permission changes.
Written by the indexing model from the issue text.
Description
To be able to adjust device permissions at runtime, this issue seeks to implement support for Linux Device CGroup updates. It is a prerequisite to get such support in Moby/Docker, see also moby/moby#42255.
Currently supplying devices to runc update --resources - does not adjust cgroup(v2) device permissions for an existing container. Some issues with device updates have been outlined in #2366 and addressed in various PRs linked to that issue.
To implement support updates would need to pass devices to the internal config.Cgroups.Resources.Devices structure. Besides update also sets config.Cgroups.SkipDevices to false explicitly, which probably would need changing.
I guess the semantics of update would need to be defined exactly. A simplistic approach would be to implement a behavior similar to what CreateCgroupConfig implements: Clear the current list of devices, append the list provided by the update command, then append the defaultDevs.
In PR #2951 @cyphar added a comment saying:
# Unfortunately we can't update device rules directly with runc ("runc
# update" doesn't support it, and adding support would require ironing out
# some long-standing design issues with device configuration). So instead
# we just run "runc update" many times, relying on the fact that runc will
# re-apply devices cgroup rules on each runc update.
What are those design issues exactly?
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opencontainers/runc
-
`root.readonly` is silently ignored (rootfs left writable) when the container has no mount namespace Openllm-generated
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opencontainers/runc#5371 ·
-
llm-generated
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
opencontainers/runc#5370 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
opencontainers/runc#2214 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
opencontainers/runc#1679 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
opencontainers/runc#5474 ·
All issues in opencontainers/runc
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100