1
0
mirror of https://github.com/opencontainers/runtime-spec.git synced 2026-02-06 12:45:15 +01:00

60 Commits

Author SHA1 Message Date
Akihiro Suda
bfdffd548a Merge pull request #1282 from askervin/5aD-oci-mempolicy
Add support for Linux memory policy
2025-08-04 17:16:26 +09:00
Markus Lehtonen
34a39b9070 config-linux: add intelRdt.enableMonitoring (#1287)
Add a parameter for enabling per-container resctrl monitoring.

This supersedes and replaces the previous "enableCMT" and "enableMBM"
settings whose functionality was very vaguely specified. Separate
parameter for every monitoring metric does not seem to make much sense, in
particular because in the resctrl filesystem it is not possible to
selectively enable a subset of the monitoring features. You always get
all the metrics that the system provides. Also, with separate settings
(and corresponding check if the specific metric is available) the user
cannot specify "enable whatever is available" - setting everything to
"true" might fail because one of the metrics is not available on the
platform. In addition, having separate parameters is very
future-unproof, making support for new monitoring metrics unnecessarily
cumbersome to add. New metrics are certain to be added in new hardware
generations, e.g. perf/energy monitoring in the near future
(https://lkml.org/lkml/2025/5/21/1631), and requiring an update to the
runtime-spec for each one of them feels like an overkill without much
benefits. It is easier to have one switch for "enable container-specific
metrics" and let the user read whatever metrics the platform provides.

Moreover, it is not even possible to turn off monitoring (from the
resctrl filesystem). For example, you always get the metrics for all
CTRL_MON groups (closIDs). However, that is not always very useful as
there likely are a lot of applications packed in the same group. The new
intelRdt.enableMontoring parameter will enable creation of a MON group
specific to a single container allowing monitoring of resctrl metrics on
per-container granularity.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-06-29 12:08:38 +09:00
Markus Lehtonen
d2f4f9097a config-linux: add schemata field to IntelRdt (#1230)
* config-linux: add schemata field to IntelRdt

Add a new "schemata" field to the Linux IntelRdt configuration. This
addresses the complexity of separate schema fields and resolves the
issue of supporting currently uncovered RDT features like L2 cache
allocation and CDP (Code and Data Prioritization).

The new field is for specifying the complete schemata (all schemas) to
be written to the schemata file in Linux resctrl fs. The aim is for
simple usage and runtime implementation (by not requiring any
parsing/filtering of data or otherwise re-implement parsing or
validation of the Linux resctrl interface) and also to support all RDT
features now and in the future (i.e. schemas like L2, L2CODE, L2DATA,
L3CODE and L3DATA and who knows L4 or something else in the future).

Behavior of existing fields is not changed but it is required that the
new schemata field is applied last.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>

* Add linux.intelRdt.schemata to features.md

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>

---------

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-05-09 21:00:57 +09:00
Antti Kervinen
57c949588e Add support for Linux memory policy
Enable setting a NUMA memory policy for the container. New
linux.memoryPolicy object contains inputs to the set_mempolicy(2)
syscall.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2025-04-23 10:32:29 +03:00
Antonio Ojea
e935f995dd Define Linux Network Devices (#1271)
The proposed "netdevices" field provides a declarative way to
specify which host network devices should be moved into a container's
network namespace.

This approach is similar than the existing "devices" field used for block
devices but uses a dictionary keyed by the interface name instead.

The proposed scheme is based on the existing representation of network
device by the `struct net_device`
https://docs.kernel.org/networking/netdevices.html.

This proposal focuses solely on moving existing network devices into
the container namespace. It does not cover the complexities of
network configuration or network interface creation, emphasizing the
separation of device management and network configuration.

Signed-off-by: Antonio Ojea <aojea@google.com>
2025-04-01 18:56:57 +09:00
Chris Bandy
6152be404b schema: remove duplicate keys
commit b6980b01b0 introduced the issue.

Signed-off-by: Chris Bandy <bandy.chris@gmail.com>
2023-04-04 20:26:08 -05:00
Giuseppe Scrivano
b6980b01b0 schema: fix schema for timeOffsets
commit 36bb632767 introduced the issue.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-29 22:30:21 +02:00
Qiang Huang
7301c34549 Merge pull request #1151 from KentaTada/add-time-namespac
Add support for time namespace
2023-02-01 11:38:51 +08:00
Kenta Tada
36bb632767 Add support for time namespace
The time namespace is a new kernel feature available in 5.6+ to
isolate the system monotonic and boot-time clocks.

Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
2023-01-24 21:20:51 +09:00
Akihiro Suda
6188d9e9ef Merge pull request #1120 from kailun-qin/add-cfs-burst
config-linux: add CFS bandwidth burst
2023-01-23 20:05:01 +09:00
Kailun Qin
d931d4b8ab config-linux: add CFS bandwidth burst
Burstable CFS controller is introduced in Linux 5.14. This helps with
parallel workloads that might be bursty. They can get throttled even
when their average utilization is under quota. And they may be latency
sensitive at the same time so that throttling them is undesired.

This feature borrows time now against the future underrun, at the cost
of increased interference against the other system users, by introducing
`cfs_burst_us` into CFS bandwidth control to enact the cap on unused
bandwidth accumulation, which will then used additionally for burst.

The patch adds the support/control for CFS bandwidth burst.

Fixes https://github.com/opencontainers/runtime-spec/issues/1119

Signed-off-by: Kailun Qin <kailun.qin@intel.com>
2022-09-02 09:40:53 -04:00
Kir Kolyshkin
9e658bcd71 config-linux: add memory.checkBeforeUpdate
This setting can be used to mimic cgroup v1 behavior on cgroup v2,
when setting the new memory limit during update operation.

In cgroup v1, a limit which is lower than the current usage is rejected.

In cgroup v2, such a low limit is causing an OOM kill.

Ref: https://github.com/opencontainers/runc/issues/3509

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-08-29 10:48:45 -07:00
Giuseppe Scrivano
bc545ecf66 schema: add cpu idle
commit 9d363b36f6 added the feature but
didn't update the json schema file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-04-20 18:12:37 +02:00
Vincent Batts
0d6cc581ae Merge pull request #1076 from Creatone/creatone/mon-support
config-linux: Add Intel RDT CMT and MBM Linux support
2021-09-10 07:50:17 -04:00
Paweł Szulik
cc7f6ec598 config-linux: Add Intel RDT CMT and MBM Linux support
Add support for Intel Resource Director Technology (RDT) /
Cache Monitoring Technology (CMT) and Memory Bandwidth Monitoring (MBM).

Example:

"linux": {
    "intelRdt": {
        "enableCMT": true,
        "enableMBM": true
    }
}

This is the prerequisite of this runc proposal:
https://github.com/opencontainers/runc/issues/2519

For more information about Intel RDT CMT and MBM, please refer to:
https://github.com/opencontainers/runc/issues/2519

Signed-off-by: Paweł Szulik <pawel.szulik@intel.com>
2021-07-13 08:53:11 +02:00
Rodrigo Campos
58798e75e9 Add Seccomp Notify support
This adds the specification for Seccomp Userspace Notification and the
Golang bindings. This contains:
- New fields in the seccomp section to use with seccomp userspace
  notification.
- Additional SeccompState struct containing the container state and file
  descriptors passed for seccomp.

This was discussed in the OCI Weekly Discussion on September 16th,
2020. After review on github, this implementation was changed to the
"Proposal with listenerPath and listenerExtraMetadata". For more
information see:
- https://github.com/opencontainers/runtime-spec/pull/1073#issuecomment-719465555

Docs presented on the community meeting (for the old implementation
using hooks):
- https://hackmd.io/El8Dd2xrTlCaCG59ns5cwg#September-16-2020
- https://docs.google.com/document/d/1xHw5GQjMj6ZKR-40aKmTWZRkvlPuzMGQRu-YpOFQc30/edit

Documentation for this feature:
- https://www.kernel.org/doc/html/v5.0/userspace-api/seccomp_filter.html#userspace-notification
- man pages: seccomp_user_notif.2 at
  https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/log/?h=seccomp_user_notif
- brauner's blog:
  https://brauner.github.io/2020/07/23/seccomp-notify.html

This PR is an alternative proposal to PR 1038. While similar in nature,
the main difference is that this PR adds optional metadata to be sent to
the seccomp agent and specifies how the UNIX socket MUST be used.

Signed-off-by: Rodrigo Campos <rodrigo@kinvolk.io>
Signed-off-by: Alban Crequy <alban@kinvolk.io>
Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
2021-03-09 18:54:39 +01:00
Giuseppe Scrivano
f7ef278d1b seccomp: allow to override default errno return code
the specs already support overriding the errno code for the syscalls
but the default value is hardcoded to EPERM.

Add a new attribute to override the default value.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-22 16:47:57 +01:00
Giuseppe Scrivano
7571d3d9f2 cgroup: add cgroup v2 support
allow users to specify cgroup v2 resources.

Each element in the map refers to a file in the cgroup v2 hierarchy
and the element value has its content.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-17 21:03:22 +02:00
Giuseppe Scrivano
03c526b268 schema: add missing definition for personality
Closes: https://github.com/opencontainers/runtime-spec/issues/1023

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-17 23:13:53 +01:00
Vincent Batts
8b180f3962 Merge pull request #985 from masters-of-cats/master
config-linux: Add Memory cgroup's use_hierarchy
2019-12-17 14:56:04 -05:00
Giuseppe Scrivano
d1ef109cd0 config-linux: support seccomp flags
allow to specify what flags must be passed to seccomp(2) when
installing the filter.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-09 15:59:27 +02:00
Odin Ugedal
759f58ad64 config-linux: add more info about hugetlb page size
Currently the docs don't say anything about what the "pageSize" is other
than the fact that it is a string. This makes it easier for developers
to understand how it works, and may help avoiding mistakes which are
hard to spot.

Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-06-10 08:24:42 +02:00
Xiaochen Shen
5d9aa69b00 config-linux: Add Intel RDT/MBA Linux support
Add support for Intel Resource Director Technology (RDT) /
Memory Bandwidth Allocation (MBA). Add memory bandwidth resource
constraints in Linux-specific configuration.

In this PR, the spec for memory bandwidth (memBwSchema) keeps
the same format as existed spec for L3 cache (l3CacheSchema)
for consistency and compatibility in runtime-spec 1.x.

Example:

"linux": {
    "intelRdt": {
        "closID": "guaranteed_group",
        "l3CacheSchema": "L3:0=7f0;1=1f",
        "memBwSchema": "MB:0=20;1=70"
    }
}

This is the prerequisite of this runc proposal:
https://github.com/opencontainers/runc/issues/1596

For more information about Intel RDT/MBA, please refer to:
https://github.com/opencontainers/runc/issues/1596

Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
2018-09-11 17:54:42 +08:00
Lin Yang
06cf8993d8 config-linux: add Intel RDT CLOS name sharing support
Creating a dedicated RDT Class of Service (CLOS) for each running
container, even they have exactly same Scheam, will lead to short of
CLOS, since there is a hardware limit for the number of CLOS, around
16 CLOS per platform.

This PR add one parameter 'closID' into existed spec to allow user
to specify which RDT Class of Service (CLOS) the container will be
located. So it can place these containers with same Schema into one
single CLOS.

Example:

"linux": {
    "intelRdt": {
        "closID": "guaranteed_group",
        "l3CacheSchema": "L3:0=ffff0;1=3ff"
    }
}

Signed-off-by: Lin Yang <lin.a.yang@intel.com>
2018-08-27 17:34:35 -07:00
Danail Branekov
234aa0be75 config-linux: Add Memory cgroup's use_hierarchy
Co-authored-by: Claudia Beresford <cberesford@pivotal.io>
Signed-off-by: Danail Branekov <danailster@gmail.com>
2018-08-22 12:59:35 +03:00
Parav Pandit
2e241f7279 specs-go/config: Define RDMA cgroup
Linux kernel 4.11 adds support for RDMA cgroup resource controller.
This allows limiting maximum number of open hca_handle and maximum number of
hca_objects which can be created by processes.

config-linux: Add documentation for Linux RDMA cgroup

Add documentation, example and link to kernel documentation for
Linux RDMA cgroup.

additionalProperties is defined for the JSON Schema draft-04 in [1]
with clearer documentation in draft-07 [2]. It is supportd by
gojsonschema since xeipuuv/gojsonschema@0572d9d (added
additionalProperties with inner schema, 2013-06-21).

[1]: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4
[2]: https://tools.ietf.org/html/draft-handrews-json-schema-validation-00#section-6.5.6

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
2018-02-27 01:29:30 -06:00
W. Trevor King
4e5a137fc1 schema: Completely drop our JSON Schema 'id' properties
We're using JSON Schema draft-04 [1], as declared by our '$schema'
properties [2].  In draft-04, the 'id' keyword alters the resolution
scope.  But our current '$ref' values use JSON Pointers [3,4] with
relative references like 'defs-linux.json#/definitions/Device' that
ignore the 'id's.

By draft-07, 'id' has become '$id', and [5]:

  The root schema of a JSON Schema document SHOULD contain an "$id"
  keyword with a URI (containing a scheme).

But since [6], including any URI that cannot be retrieved generates an
error:

  $ ./validate config-schema.json test/config/good/minimal.json
  Could not read schema from HTTP, response status is 404 Not Found

While a root 'id' entry would be nice, we don't currently host these
anywhere with a useful URI.  We could use [7], but then testing pull
requests would be difficult.

By draft-07, the purpose of internal '$id' entries is clearly
explained [5]:

  Providing a plain name fragment enables a subschema to be relocated
  within a schema without requiring that JSON Pointer references are
  updated.

We don't need that, because we control all the references.  In the
infrequent event of a subschema move, we can update the consuming
references in the same commit.

The draft-07 $ref docs also explain that $ref targets may be URNs [8]:

  The URI is not a network locator, only an identifier.  A schema need
  not be downloadable from the address if it is a network-addressable
  URL, and implementations SHOULD NOT assume they should perform a
  network operation when they encounter a network-addressable URI.

I haven't found analogous wording for $id, but it's possible that
gojsonschema is being overly agressive with its attempted retrievals.

This commit removes all of our 'id' entries.  The resulting JSON
Schema is valid (regardless of where you host it) and does not
generate the 404s.

Reported by Tom Godkin [9] and William Martin [10].

[1]: https://tools.ietf.org/html/draft-zyp-json-schema-04#section-7.2
[2]: https://tools.ietf.org/html/draft-zyp-json-schema-04#section-6
[3]: https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07
[4]: https://tools.ietf.org/html/rfc6901
[5]: https://tools.ietf.org/html/draft-handrews-json-schema-00#section-9.2
[6]: 83a7f6369d
[7]: https://raw.githubusercontent.com/opencontainers/runtime-spec/v1.0.1/schema/config-schema.json
[8]: https://tools.ietf.org/html/draft-handrews-json-schema-00#section-8
[9]: https://github.com/opencontainers/runc/issues/1680
[10]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/L9ME-YRPmmc
      Subject: runtime-spec validation questions
      Date: Thu, 4 Jan 2018 15:47:50 +0000
      Message-ID: <CAMp6QwMTJab5K25=CVy=6OZV6NRX0s-nMLGwqC8ZMpFEp5bF_Q@mail.gmail.com>

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-05 11:20:18 -08:00
Zhou Hao
855811663b schema: add allowed values for defaultAction
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2017-12-05 15:17:12 +08:00
Michael Crosby
30bdf3b2b3 Merge pull request #889 from q384566678/intelRdt-add
config-linux: add intelRdt field
2017-08-01 09:04:43 -04:00
0x0916
52cdbdc942 schema/config-linux: s/throttleWriteIopsDevice/throttleWriteIOPSDevice/
Signed-off-by: 0x0916 <w@laoqinren.net>
2017-07-15 09:27:17 +08:00
W. Trevor King
ef514090c1 config-linux: Move 'disableOOMKiller' under 'memory'
It's backed by memory.oom_control, so this commit moves it in with
the rest of the memory-controller config.

Looking at the history, the initial request landing a setting for this
in the Docker/OCI ecosystem seems to be [1], which added
Cgroup.OomKillDisable.  That commit was carried from libcontainer into
runC [2] where it is now Resources.OomKillDisable [3].  From runC it
was carried into this repo (with some renaming) in [4].  Subsequent
early doc updates landed in [5,6].  In none of those can I find
discussion about why the setting is not already under memory.  I
expect the reason is that the runC structures are flat, so "under
memory" is not a thing there.  But in this spec, resources has
per-controller sub-properties.  The fact that disableOOMKiller
belonged to the memory controller may have been overlooked in [4] and
never revisited until now.

[1]: https://github.com/docker/libcontainer/pull/417
     Subject: cgroups: add support for oom control
[2]: 295c70865d
     Subject: cgroups: add support for oom control
[3]: https://github.com/opencontainers/runc/blob/v1.0.0-rc3/libcontainer/configs/cgroup_unix.go#L113-L114
[4]: https://github.com/opencontainers/runtime-spec/pull/51
     Subject: Add Go types for specification
[5]: https://github.com/opencontainers/runtime-spec/pull/137
     Subject: Adding cgroups path to the Spec.
[6]: https://github.com/opencontainers/runtime-spec/pull/199
     Subject: runtime: config: linux: add cgroups informations

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-07-12 15:02:15 -07:00
zhouhao
98fbee80ca config-linux: add intelRdt field
Fix #630

Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-07-11 13:43:07 +08:00
Justin Cormack
e73cd70caa Make Linux memory allocations int64 not uint64
The kernel ABI to these values is a string, which accepts the value `-1`
to mean "unlimited" or an integer up to 2^63 for an amount of memory in
bytes.

While the internal representation in the kernel is unsigned, this is not
exposed in any ABI directly. Because of the user-kernel memory split, values
over 2^63 are not really useful; indeed that much memory is not supported,
as physical memory is limited to 52 bits in the forthcoming switch to five
level page tables. So it is much more natural to support the value `-1` for
unlimited, especially as the actual number needed to represent the maximum
has varied in different kernel versions, and across 32 and 64 bit architectures,
so determining the value to use is not possible, so it is necessary to write
the string `-1` to the cgroup files.

See also discussion in
- https://github.com/opencontainers/runc/pull/1494
- https://github.com/opencontainers/runc/pull/1492
- https://github.com/opencontainers/runc/pull/1375
- https://github.com/opencontainers/runc/issues/1421

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-23 15:43:28 -07:00
W. Trevor King
d8ca338a30 config-linux: Drop redundant 'blkio' prefix from blockIO properties
These are long enough without the prefix, and
linux.resources.blockIO.blkioWeight, etc. are just as specific as
linux.resources.blockIO.weight.

Generated with:

  $ sed -i s/blkioWeight/weight/g $(git grep -l blkioWeight)
  $ sed -i s/blkioLeaf/leaf/g $(git grep -l blkioLeaf)
  $ sed -i s/blkioThrottle/throttle/g $(git grep -l blkioThrottle)

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-06-01 08:23:08 -07:00
W. Trevor King
4b49c64a88 config: Shift oomScoreAdj from linux.resources to process
The only discussion related to this is in [1,2], where the
relationship between oomScoreAdj and disableOOMKiller is raised. But
since 429f936 (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 (see
7795661 (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>
2017-05-09 16:46:30 -07:00
zhouhao
79494b2175 schema: Fix the error
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-04-27 13:49:18 +08:00
Mrunal Patel
13895d6074 Merge pull request #775 from q384566678/rootfs-enum
schema: Add enumeration to rootfsPropagation values
2017-04-26 15:59:09 -07:00
Tianon Gravi
138ad89ca8 Merge pull request #768 from wking/optional-syscalls
config-linux: Make linux.seccomp.syscalls OPTIONAL
2017-04-26 08:29:52 -07:00
Qiang Huang
ce55de2517 Remove range limit which depend on kernel
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-04-26 22:46:02 +08:00
W. Trevor King
42984e8d3c config-linux: Make linux.seccomp.syscalls OPTIONAL
Before this commit, linux.seccomp.sycalls was required, but we didn't
require an entry in the array.  That means '"syscalls": []' would be
technically valid, and I'm pretty sure that's not what we want.

If it makes sense to have a seccomp property that does not need
syscalls entries, then syscalls should be optional (which is what this
commit is doing).

If it does not makes sense to have an empty/unset syscalls then it
should be required and have a minimum length of one.

Before 652323c (improve seccomp format to be more expressive,
2017-01-13, #657), syscalls was omitempty (and therefore more
optional-feeling, although there was no real Markdown spec for seccomp
before 3ca5c6c, config-linux.md: fix seccomp, 2017-03-02, #706, so
it's hard to know).  This commit has gone with OPTIONAL, because a
seccomp config which only sets defaultAction seems potentially valid.

The SCMP_ACT_KILL example is prompted by:

On Tue, Apr 25, 2017 at 01:32:26PM -0700, David Lyle wrote [1]:
> Technically, OPTIONAL is the right value, but unless you specify the
> default action for seccomp to be SCMP_ACT_ALLOW the result will be
> an error at run time.
>
> I would suggest an additional clarification to this fact in
> config-linux.md would be very helpful if marking syscall as
> OPTIONAL.

I've phrased the example more conservatively, because I'm not sure
that SCMP_ACT_ALLOW is the only possible value to avoid an error.  For
example, perhaps a SCMP_ACT_TRACE default with an empty syscalls array
would not die on the first syscall.  The point of the example is to
remind config authors that without a useful syscalls array, the
default value is very important ;).

Also add the previously-missing 'required' property to the seccomp
JSON Schema entry.

[1]: https://github.com/opencontainers/runtime-spec/pull/768#issuecomment-297156102

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-04-25 15:06:57 -07:00
zhouhao
a084798c96 schema: Add enumeration to rootfsPropagation values
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-04-21 13:29:13 +08:00
Qiang Huang
ec9449187b Set specs value the same as kernel API input
This partially revert #648 , after a second thought, I think we
should use specs value the same as kernel API input, see:
https://github.com/opencontainers/runtime-spec/issues/692#issuecomment-281889852

For memory and hugetlb limits *.limit_in_bytes, cgroup APIs take the values
as string, but the parsed values are unsigned long, see:
https://github.com/torvalds/linux/blob/v4.10/mm/page_counter.c#L175-L193

For `cpu.cfs_quota_us` and `cpu.rt_runtime_us`, cgroup APIs take the input
value as signed long long, while `cpu.cfs_period_us` and `cpu.rt_periof_us`
take the input value as unsigned long long.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-03-01 09:10:43 +08:00
Ma Shimiao
4100020dfc schema: fix invalid types
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-02-08 16:35:45 +08:00
W. Trevor King
092743727e schema: Drop pointers and nulls
Maintainers feel (and I agree) that there's no point in explicitly
allowing a null value when callers can simply leave the property unset
[1].  This commit removes all references to "pointer" and "null" from
the JSON Schema to support that decision.  While optional properties
may sometimes be represented as pointer types in Go [2], optional
properties should be represented in JSON Schema by not including the
properties in the 'required' array.

[1]: https://github.com/opencontainers/runtime-spec/pull/555#issuecomment-272020515
[2]: style.md "Optional settings should not have pointer Go types"

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-23 11:23:44 -08:00
Michael Crosby
d5a1269c87 Merge pull request #545 from Mashimiao/fix-blockio-related-validation
fix blkio related validation
2017-01-23 10:32:27 -08:00
Ma Shimiao
1b3e2c7f26 schema: fix invalid string reference
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-23 11:49:22 +08:00
Vincent Batts
dc0fa75942 Merge pull request #655 from Mashimiao/schema-fix-with-latest-spec
schema: fix items based on latest spec
2017-01-18 17:29:21 -05:00
W. Trevor King
83200898a1 schema: Remove string pointers
Catch up with 868e6310 (Remove string pointers, 2017-01-12, #653).

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-13 07:09:36 -08:00
Ma Shimiao
5076439d49 schema: fix items based on latest spec
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-13 13:59:16 +08:00
Ma Shimiao
58832f9148 config-linux: remove unneeded null for array
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-12 14:59:40 +08:00