opencontainers / opencontainers/runc
Move cgroupv1 specific code out of libcontainers/cgroups pkg
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
The following public identifiers should be moved from github.com/opencontainers/runc/libcontainer/cgroups to a separate package (say github.com/opencontainers/runc/libcontainer/cgroups/cgroupv1). The reason is, they should only be used from cgroupv1 code (i.e. when cgroups.IsCgroup2UnifiedMode() returns false), and they return errors otherwise.
- CgroupNamePrefix
- IsNotFound
- FindCgroupMountpoint
- FindCgroupMountpointAndRoot
- Mount
- GetOwnCgroup
- GetCgroupMounts
- GetOwnCgroup
- GetOwnCgroupPath
- GetInitCgroup
- GetInitCgroupPath
In addition, this one should be made private:
- NotFoundError
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.
Research direction
Start by locating the public identifiers in github.com/opencontainers/runc/libcontainer/cgroups and all repository references to them. Trace the cgroupv1 and cgroupv2 call paths before moving the listed cgroupv1 identifiers into libcontainer/cgroups/cgroupv1. Done means callers use the new package and NotFoundError is no longer public.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100