opencontainers / opencontainers/runc
Make runc state.json OCI-compatible
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
One thing I would like to do before a runc 1.0 is to make the runc state object smaller and dynamically recreate the information that we need.
Historically, before the OCI spec we had the libcontainer structs and in order to load the container back up we needed to not only serialize the config struct but also the runtime state into the same state files. This makes them pretty big. They also hold pid, namespace paths, and cgroup paths.
The change I would like to make is to only store the pid and the bundle path as the "state" of the container and recreate everything from the information that the pid provides us and the static data by re-reading the OCI spec for the container.
This will make the state on disk much smaller and less error prone to backwards incompat changes. This may have to include a refactoring in libcontainer to not use the configs package anymore and to only rely on the OCI spec types for its internal and external data structures, as far as configuration is concerned.
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 tracing how libcontainer writes and reloads the state files, including its use of the configs package and OCI spec data. Determine how the pid and bundle path can provide the remaining runtime information. Done means state stores only those values while container reloads remain functional and the state is OCI-compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, infrastructure
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100