mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
4b49c64a88
The only discussion related to this is in [1,2], where the relationship between oomScoreAdj and disableOOMKiller is raised. But since429f936(Adding cgroups path to the Spec, 2015-09-02, #137) resources has been tied to cgroups, and oomScoreAdj is not about cgroups. For example, we currently have (in config-linux.md): You can configure a container's cgroups via the resources field of the Linux configuration. I suggested we move the property from linux.resources.oomScoreAdj to linux.oomScoreAdj so config authors and runtimes don't have to worry about what cgroupsPath means if the only entry in resources is oomScoreAdj. Michael responded with [4]: If anything it should probably go on the process So that's what this commit does. I've gone with the four-space indents here to keep Pandoc happy (see7795661(runtime.md: Fix sub-bullet indentation, 2016-06-08, #495), but have left the existing entries in this list unchanged to reduce churn. [1]: https://github.com/opencontainers/runtime-spec/pull/236 [2]: https://github.com/opencontainers/runtime-spec/pull/292 [3]: https://github.com/opencontainers/runtime-spec/pull/137 [4]: https://github.com/opencontainers/runtime-spec/issues/782#issuecomment-299990075 Signed-off-by: W. Trevor King <wking@tremily.us>
JSON schema
Overview
This directory contains the JSON Schema for validating JSON covered by this specification.
The layout of the files is as follows:
- config-schema.json - the primary entrypoint for the configuration schema
- config-linux.json - the Linux-specific configuration sub-structure
- config-solaris.json - the Solaris-specific configuration sub-structure
- config-windows.json - the Windows-specific configuration sub-structure
- state-schema.json - the primary entrypoint for the state JSON schema
- defs.json - definitions for general types
- defs-linux.json - definitions for Linux-specific types
- validate.go - validation utility source code
Utility
There is also included a simple utility for facilitating validation. To build it:
export GOPATH=`mktemp -d`
go get -d ./...
go build ./validate.go
rm -rf $GOPATH
Or you can just use make command to create the utility:
make validate
Then use it like:
./validate config-schema.json <yourpath>/config.json
Or like:
./validate https://raw.githubusercontent.com/opencontainers/runtime-spec/v1.0.0-rc1/schema/schema.json <yourpath>/config.json