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

1679 Commits

Author SHA1 Message Date
Qiang Huang
d64c1d945d Merge pull request #1307 from giuseppe/fix-schema
schema: fix two regressions
2025-12-11 15:54:40 +08:00
Giuseppe Scrivano
4361740b60 schema: fix definition for array type
commit af0d16d781 introduced the
regression.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-12-09 13:38:47 +01:00
Giuseppe Scrivano
04836b1e7a schema: fix path for uint32 type
commit af0d16d781 introduced the
regression.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-12-09 12:15:48 +01:00
Akihiro Suda
fd25dd34a0 Merge pull request #1302 from AkihiroSuda/propose-v1.3.0
Release v1.3.0
2025-11-04 18:19:23 +09:00
Akihiro Suda
9d0d4bceb3 version: v1.3.0+dev
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-11-02 16:35:52 +09:00
Akihiro Suda
92249139ee version: release v1.3.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
v1.3.0
2025-11-02 16:35:43 +09:00
Tianon Gravi
6acd32dd23 Merge pull request #1304 from gogolok/add_freebsd_spec_links
Mention FreeBSD platform
2025-11-01 12:06:20 -07:00
Robert Gogolok
4df3d111a4 Mention FreeBSD platform
Signed-off-by: Robert Gogolok <gogolok@gmail.com>
2025-11-01 15:11:34 +01:00
Akihiro Suda
dbf183c3b7 Merge pull request #1286 from dfr/freebsd-spec
Add FreeBSD as a platform
2025-10-28 13:44:17 +09:00
Tianon Gravi
a257bebddf Add minimum supported Go version to CI (#1303)
* Add minimum supported Go version to CI

On top of automatically testing against the two most recent releases (what Go upstream supports), also test explicitly against our lower bound.

As noted in the previous change, don't have a `go.mod` to source this information from, so it's simply hard-coded in this file instead.

(I chose 1.21 as that was the lowest version we were testing against previously, but it's possible that could go lower or actually reasonably needs to go higher.)

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>

* Add explicit `GOTOOLCHAIN=local` in CI

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>

---------

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2025-10-26 06:31:28 +09:00
Doug Rabson
afdbcb8545 Add FreeBSD as a platform
This uses FreeBSD jails to implement container isolation.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2025-10-24 14:23:35 +01:00
Aleksa Sarai
5caf3047c3 merge #1300 into opencontainers/runtime-spec:main
Kir Kolyshkin (1):
  ci: use oldstable and stable Go versions

LGTMs: AkihiroSuda tianon cyphar
2025-10-22 18:20:15 +11:00
Kir Kolyshkin
75d79eeac5 ci: use oldstable and stable Go versions
The upside is, we don't have to bump the versions here every 6 months.

The downside is, CI might break once the new Go is out.

Overall I think it is net positive.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-10-21 16:43:14 -07:00
Akihiro Suda
5610abdb9f Merge pull request #1298 from kolyshkin/fix-file-mode
config-linux,schema: fix FileMode description
2025-10-15 12:50:11 +09:00
Akihiro Suda
3b11014623 Merge pull request #1281 from kolyshkin/codespell
CI: add codespell, bump golangci-lint
2025-10-15 12:49:47 +09:00
Kir Kolyshkin
d7de8c08f3 ci: bump golangci-lint to v2.5
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-10-14 16:34:29 -07:00
Kir Kolyshkin
97580111bb ci: add codespell job, fix existing issues
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-10-14 16:33:38 -07:00
Kir Kolyshkin
9efd9f23e0 schema/defs-linux.json: fix max for FileMode
Current spec allows decimal 512 as a maximum value for FileMode,
which is octal 1000, meaning sticky bit is set and no rwx permissions
for anyone (aka s---------).

This does not make sense,the maximum value should be 511 (which is
octal 777, aka -rwxrwxrwx).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-10-14 16:28:48 -07:00
Kir Kolyshkin
09ec668274 config-linux,schema: fix FileMode description
Originally, the file mode was indeed written in octal (see e.g.
commit 5273b3d), but it was found out later that JSON does not
allow octal values so the examples were changed to decimal in
commit ccf3a24, but the "typically an octal value" bit (added
by commit cdcabde) remains.

Change it to emphasize the fact that this is in decimal.

Also, add a note to config-linux.md saying the same thing.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-10-14 16:28:38 -07:00
Akihiro Suda
e83cdc21c5 Merge pull request #1297 from kolyshkin/fix-indent
schema: fix json
2025-10-11 11:53:52 +09:00
Kir Kolyshkin
87f15fb9f5 schema: fix json
Fix a bad indentation in json after commit af0d16d (for some reason
CI didn't catch that).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-10-10 15:23:16 -07:00
Kir Kolyshkin
a009f6da1a Merge pull request #1209 from oleksiimoisieiev/hwconfig
config: Add Hardware description object to the VM configuration
2025-10-10 15:18:18 -07:00
Kir Kolyshkin
5e89a5d370 Merge pull request #1196 from ipuustin/rdt-clarifications
Clarify Intel RDT configuration
2025-10-10 15:15:44 -07:00
Akihiro Suda
62106c19fd Merge pull request #1279 from cyphar/pids-limit-0-value
linux: clarify pids cgroup settings
2025-09-18 11:23:49 +09:00
Aleksa Sarai
869b2d5b0c linux: clarify pids cgroup settings
The history of this is a little complicated, but in short there is an
argument to be made that several misunderstandings resulted in the spec
sometimes implying (and runtimes interpreting) a pids.limit value of 0
to be equivalent to "max" or otherwise having unfortunate handling of
the value.

The slightly longer background is the following:

1. When commit 834fb5db52 ("spec: linux: add support for the PIDs
   cgroup") added support, we did not yet have textual documentation of
   cgroup configuration values. In addition, we had not yet started
   using pointers to indicate optional fields and detect unset fields.
   However, the initial commit did imply that pids.limit=0 should be
   treated as a real value.

2. Commit 2ce2c866ff ("runtime: config: linux: add cgroups
   information") labeled "pids.limit" as being a REQUIRED field. This
   may seem trivial, but consider this foreshadowing for point 5.

3. Later, commit 9b19cd2fab ("config: linux: update description of
   PidsLimit") was added to explicitly make pids.limit=0 equivalent to
   max (at the time there was a kernel patch proposed to make setting
   pids.max to 0 illegal, though it was never merged).

   This is often pointed to as being the reason for runtimes
   interpreting this behaviour this way, however...

4. Soon after, 488f174af9 ("Make optional Cgroup related config params
   pointers along with `omitempty` json tag.") converted it to a pointer
   and changed the code comment to state that the "default value" means
   "no limit" -- and the default value was now a pointer so the default
   value is nil not 0. At this stage, using 0 to mean "no limit" would
   arguably no longer be correct.

5. However, because the field was marked as REQUIRED in point 2, a while
   later commit ef9ce84cf9 ("specs-go/config: fix required items
   type") changed the value back to a non-pointer but didn't modify the
   code comment -- and so ended up codifying the "0 means no limit"
   behaviour.

   I would argue this commit is the reason why runtimes have interpreted
   the behaviour this way (though runc likely did it because of point 3
   since I authored both patches, and other runtimes probably looked at
   runc to see how they should interpret this confusing history -- my
   bad!).

So, let's finally have some clarity and add wording to conclusively
state that the correct representation of max is -1 (like every other
cgroup configuration value) and that users should not treat 0 as a
special value of any kind. A nil value means "do not touch it" (just
like every other cgroup configuration value too).

Note that a pids.max value of 0 is actually different to 1 now that
CLONE_INTO_CGROUP exists (at the time pids was added to the kernel and
the spec, this feature didn't exist and so it may have seemed redundant
to have two equivalent values -- hence my attempt to make 0 an illegal
value for the kernel implementation).

For the Go API, this is effectively a partial revert of commit
ef9ce84cf9 ("specs-go/config: fix required items type") which turned
the limit value into a bare int64.

Fixes: 2ce2c866ff ("runtime: config: linux: add cgroups information")
Fixes: 9b19cd2fab ("config: linux: update description of PidsLimit")
Fixes: ef9ce84cf9 ("specs-go/config: fix required items type")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-09-18 11:56:22 +10:00
Ismo Puustinen
a6c310aa55 config-linux: clarify when the RDT sub-directory should be removed.
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
2025-08-28 19:37:30 +03:00
Ismo Puustinen
b280c07d44 config-linux: clarify the "MB:"-line filtering in RDT.
The thinking is that the runtimes should not do the filtering of values,
but instead just apply the values in order. This way the possible
MB-lines in l3CacheSchema will become overwritten by memBwSchema values
(if the domains overlap).

Note that we can't just concatenate the values because kernel will error
out if the same domain is attempted to be set multiple times within one
write() call.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
2025-08-28 19:34:19 +03:00
Tianon Gravi
e3c8d12d94 Merge pull request #1294 from askervin/5cl_doc_mpol_emptynodes
docs: fix and elaborate the nodes field in Linux memory policy
2025-08-28 07:41:23 -07:00
Aleksa Sarai
2290f218fd merge #1262 into opencontainers/runtime-spec:main
Kir Kolyshkin (1):
  runtime: fail when a poststart hook fails

LGTMs: utam0k cyphar
2025-08-28 02:53:29 +10:00
Antti Kervinen
84b6c2c45c docs: fix and elaborate the nodes field in Linux memory policy
Nodes is required only in some memory policy modes, while some other
modes require that there must be no nodes.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2025-08-27 16:52:15 +03:00
Akihiro Suda
8675d5698f Merge pull request #1289 from marquiz/devel/rdt-default-clos
config-linux: define default clos for linux.intelRdt
2025-08-27 14:58:32 +09:00
Akihiro Suda
383cadbf08 Merge pull request #1290 from marquiz/devel/rdt-features-monitoring
features-linux: expose IntelRdt monitoring support
2025-08-18 15:13:21 +08:00
Markus Lehtonen
0758679818 features-linux: expose IntelRdt monitoring support
Commit 34a39b9070 introduced the
"linux.intelRdt.enableMonitoring" field. This patch supplements it by
adding "linux.intelRdt.monitoring" field in the features.json to check
if the runtime implementation supports the new field of the spec.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-08-18 09:55:31 +03:00
Akihiro Suda
cabadbc80b Merge pull request #1291 from marquiz/devel/rdt-specs-go
specs-go/features: add linux.intelRdt.schemata field
2025-08-17 13:08:52 +08:00
Markus Lehtonen
e51a839d16 config-linux: define default clos for linux.intelRdt
Specify "/" as an explicit value for linux.intelRdt.closID to assign a
container to the default CLOS, corresponding to the root of the resctrl
filesystem.

This addition is important after the recently introduced
intelRdt.enableMonitoring field. There is no way to express "enable
monitoring but keep the container in the default CLOS". Users would
otherwise have to rely on pre-created CLOSes or may quickly exhaust
available CLOS entries - in some configurations the number of available
CLOSes (on top of the default) may be as low as three.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-08-15 13:50:28 +03:00
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
642344aa82 specs-go/features: add linux.intelRdt.schemata field
Accidentally left out from d2f4f9097a
which added the "linux.intelRdt.schemata" field to the config.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-08-04 10:41:19 +03: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
Qiang Huang
82cca47c22 Merge pull request #1288 from ariel-anieli/principles-typo
principles: fix typo
2025-06-11 17:18:03 +08:00
Ariel Otilibili
afd830f6d4 principles: fix typo
Replaced by the commonly used spelling of DevOps.

s/devOps/DevOps/

Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2025-06-11 10:59:21 +02: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
Arman Shakerian
27cb0027fd docs: fix typo (#1285) 2025-04-28 07:48:08 +09:00
Kir Kolyshkin
c26fb8ad45 Merge pull request #1284 from Sharmaann/fix-docs-typo
docs: add missing backticks for code formatting
2025-04-25 16:20:51 -07:00
sharmaann
0ed7cf6493 docs: add missing backticks for code formatting
Signed-off-by: sharmaann <shakerian.arman@yahoo.com>
2025-04-25 20:13:58 +03:30
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
Kir Kolyshkin
ea38318166 Merge pull request #1272 from Artoria2e5/patch-1
add systemd-nspawn to implementations.md
2025-03-09 20:35:02 -07:00
Mingye Wang
df100de539 add systemd-nspawn to implementations.md
It's a bit awkward really, since that nspawn isn't the WHOLE repo on GitHub unlike the others...

Signed-off-by: Mingye Wang <arthur200126@gmail.com>
2025-03-10 11:17:28 +08:00
Tianon Gravi
f6144db19f Merge pull request #1278 from kiashok/v1.2.1-release
Release v1.2.1
2025-02-27 18:24:58 +00:00
Kirtana Ashok
95a651f2cc Add back +dev
Signed-off-by: Kirtana Ashok <kirtana.ashok@gmail.com>
2025-02-25 14:46:21 -08:00