Commit Graph

7605 Commits

Author SHA1 Message Date
Aleksa Sarai
77367fca1f VERSION: back to development
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-09-05 19:03:49 +10:00
Aleksa Sarai
b2ec7f9201 VERSION: release v1.4.0-rc.1
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
v1.4.0-rc.1
2025-09-05 19:03:49 +10:00
Aleksa Sarai
081b8c25b3 CHANGELOG: forward-port v1.3.1 changelog
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-09-05 19:03:49 +10:00
Aleksa Sarai
1931ebf739 CHANGELOG: forward-port v1.2.7 changelog
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-09-05 19:03:49 +10:00
Akihiro Suda
95b448addf Merge pull request #4882 from opencontainers/dependabot/github_actions/actions/setup-go-6
build(deps): bump actions/setup-go from 5 to 6
2025-09-05 16:05:48 +09:00
dependabot[bot]
edc2eb60f3 build(deps): bump actions/setup-go from 5 to 6
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 04:02:34 +00:00
Kir Kolyshkin
8483c697a7 Merge pull request #4735 from ningmingxiao/fix_start
bug:fix runc delete run before delete exec.fifo
2025-09-02 22:35:59 -07:00
Kir Kolyshkin
424745c6e6 Merge pull request #4877 from cyphar/remove-libct-user
libct: user: remove deprecated module
2025-09-02 22:25:39 -07:00
Kir Kolyshkin
ba97aebfc0 Merge pull request #4874 from kolyshkin/ci-run-modernize
ci/validate: add modernize run
2025-09-02 22:23:59 -07:00
Aleksa Sarai
779c9e1d9a libct: user: remove deprecated module
libcontainer/user was marked as deprecated in d9ea71bf96 ("deprecate
libcontainer/user") and users have had plenty of time to migrate to
github.com/moby/sys/user.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-09-03 00:45:15 +10:00
Kir Kolyshkin
c04d9c446d ci/validate: add modernize run
Modernize tool [1] basically ensures that the new language features and
packages are used across the code.

The reason to run it in CI is to ensure that
 - PR authors use modern code;
 - our code is modern whether we bump Go version in go.mod.

Shove it into go-fix job which already does a similar thing
but for 'go-fix' and rename the whole job to modernize.

[1]: https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-29 15:24:04 -07:00
Rodrigo Campos
7a982f4282 Merge pull request #4854 from marquiz/devel/rdt-root-clos
libcontainer/intelrdt: support explicit assignment to root CLOS
2025-08-29 07:17:43 -03:00
Markus Lehtonen
762819496e libcontainer/configs/validate: add doc.go
Add package comment to make revive pass muster.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-08-29 12:36:04 +03:00
Markus Lehtonen
ba68a17ad1 libcontainer/configs: add validator unit tests for intelRdt
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-08-28 14:11:07 +03:00
Markus Lehtonen
b8a83ac255 libcontainer/intelrdt: support explicit assignment to root CLOS
Makes it possible e.g. to enable monitoring
(linux.intelRdt.enableMonitoring) without creating a CLOS (resctrl
group) for the container.

Implements https://github.com/opencontainers/runtime-spec/pull/1289.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-08-28 14:08:37 +03:00
Akihiro Suda
d845c4ae24 Merge pull request #4868 from kolyshkin/test-nits
Fix bogus test failures when running with RUNC=$(pwd)/runc.smth
2025-08-28 14:10:00 +09:00
Rodrigo Campos
f8bb8ace3c Merge pull request #4851 from kolyshkin/go124-min
Switch to Go 1.24 as a min version, bump CI, modernize sources
2025-08-27 23:33:58 -03:00
Kir Kolyshkin
89e59902c4 Modernize code for Go 1.24
Brought to you by

	modernize -fix -test ./...

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-27 19:11:02 -07:00
Kir Kolyshkin
b042b6d455 types/events: use omitzero where appropriate
In these cases, omitempty doesn't really work so it is useless,
but omitzero actually works.

As a result, output of `runc events` may omit these fields if all they
contain are zeroes.

NOTE this might be a breaking change.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-27 19:11:02 -07:00
Kir Kolyshkin
26602650ad Add go 1.25, require go 1.24
Now that Go 1.25 is out, let's switch to go 1.24.0 as a minimally
supported version, drop Go 1.23 and add Go 1.25 to CI matrix.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-27 19:11:01 -07:00
Kir Kolyshkin
237cc9806a libct/sys/rlimit_linux: drop go:build tag
This is not needed since commit 16d73367 which sets 1.23 to be a
minimally required Go version.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-27 19:09:58 -07:00
Kir Kolyshkin
a38f42ab87 tests/int/help: simplify and fix
1. In case runc binary file name is not runc, the test fails like
   below. The fix is to get the binary name from $RUNC.

	 ✗ runc command -h
	   (in test file tests/integration/help.bats, line 27)
	     `[[ ${lines[1]} =~ runc\ checkpoint+ ]]' failed
	   runc-go1.25.0-main checkpoint -h (status=0):
	   NAME:
	      runc-go1.25.0-main checkpoint - checkpoint a running container

2. Simplify the test by adding a loop for all commands. While at it, add
   a loop for -h --help as well.

3. Add missing commands (create, ps, features).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-27 18:08:51 -07:00
Kir Kolyshkin
c5e7bc8710 tests/int/selinux: fix for non-standard binary name
The setup in selinux.bats assumes $RUNC binary name ends in runc, and
thus it fails when we run it like this:

	sudo -E RUNC=$(pwd)/runc.patched bats tests/integration/selinux.bats

Fix is easy.

Fixes: b39781b06 ("tests/int: add selinux test case")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-27 18:08:51 -07:00
Aleksa Sarai
cc8ab60e1a merge #4858 into opencontainers/runc:main
Aleksa Sarai (3):
  libct: reset CPU affinity by default
  tests: add RUNC_CMDLINE for tests incompatible with functions
  tests: add sane_run helper

LGTMs: lifubang kolyshkin
2025-08-28 10:53:20 +10:00
Aleksa Sarai
121192ade6 libct: reset CPU affinity by default
In certain deployments, it's possible for runc to be spawned by a
process with a restrictive cpumask (such as from a systemd unit with
CPUAffinity=... configured) which will be inherited by runc and thus the
container process by default.

The cpuset cgroup used to reconfigure the cpumask automatically for
joining processes, but kcommit da019032819a ("sched: Enforce user
requested affinity") changed this behaviour in Linux 6.2.

The solution is to try to emulate the expected behaviour by resetting
our cpumask to correspond with the configured cpuset (in the case of
"runc exec", if the user did not configure an alternative one). Normally
we would have to parse /proc/stat and /sys/fs/cgroup, but luckily
sched_setaffinity(2) will transparently convert an all-set cpumask (even
if it has more entries than the number of CPUs on the system) to the
correct value for our usecase.

For some reason, in our CI it seems that rootless --systemd-cgroup
results in the cpuset (presumably temporarily?) being configured such
that sched_setaffinity(2) will allow the full set of CPUs. For this
particular case, all we care about is that it is different to the
original set, so include some special-casing (but we should probably
investigate this further...).

Reported-by: ningmingxiao <ning.mingxiao@zte.com.cn>
Reported-by: Martin Sivak <msivak@redhat.com>
Reported-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-08-28 08:25:46 +10:00
Aleksa Sarai
d1f6acfab0 tests: add RUNC_CMDLINE for tests incompatible with functions
Sometimes we need to run runc through some wrapper (like nohup), but
because "__runc" and "runc" are bash functions in our test suite this
doesn't work trivially -- and you cannot just pass "$RUNC" because you
you need to set --root for rootless tests.

So create a setup_runc_cmdline helper which sets $RUNC_CMDLINE to the
beginning cmdline used by __runc (and switch __runc to use that).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-08-28 08:23:15 +10:00
Aleksa Sarai
ea385de40c tests: add sane_run helper
"runc" was a special wrapper around bats's "run" which output some very
useful diagnostic information to the bats log, but this was not usable
for other commands. So let's make it a more generic helper that we can
use for other commands.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-08-28 08:23:15 +10:00
Aleksa Sarai
fa0ca2e36d merge #4848 into opencontainers/runc:main
Markus Lehtonen (1):
  CHANGELOG: document breaking change of runc update

LGTMs: AkihiroSuda cyphar
2025-08-28 08:19:41 +10:00
Markus Lehtonen
a8faf92551 CHANGELOG: document breaking change of runc update
Co-authored-by: lfbzhm <lifubang@acmcoder.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2025-08-25 14:54:30 +03:00
Rodrigo Campos
a746c53cef Merge pull request #4831 from marquiz/devel/rdt-root
libcontainer/intelrdt: refactor path handling
2025-08-24 02:15:54 -03:00
lfbzhm
d2e86c05c8 Merge pull request #4765 from kolyshkin/criu-nits
Refactor/improve prepareCriuRestoreMounts
2025-08-24 13:06:22 +08:00
Rodrigo Campos
835591bab6 Merge pull request #4860 from opencontainers/dependabot/go_modules/google.golang.org/protobuf-1.36.8
build(deps): bump google.golang.org/protobuf from 1.36.7 to 1.36.8
2025-08-21 10:16:07 -03:00
Rodrigo Campos
d3869ed5ef Merge pull request #4861 from opencontainers/dependabot/go_modules/github.com/coreos/go-systemd/v22-22.6.0
build(deps): bump github.com/coreos/go-systemd/v22 from 22.5.0 to 22.6.0
2025-08-21 10:15:41 -03:00
dependabot[bot]
a876347d08 build(deps): bump github.com/coreos/go-systemd/v22 from 22.5.0 to 22.6.0
Bumps [github.com/coreos/go-systemd/v22](https://github.com/coreos/go-systemd) from 22.5.0 to 22.6.0.
- [Release notes](https://github.com/coreos/go-systemd/releases)
- [Commits](https://github.com/coreos/go-systemd/compare/v22.5.0...v22.6.0)

---
updated-dependencies:
- dependency-name: github.com/coreos/go-systemd/v22
  dependency-version: 22.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 04:38:46 +00:00
dependabot[bot]
eedec9c5f0 build(deps): bump google.golang.org/protobuf from 1.36.7 to 1.36.8
Bumps google.golang.org/protobuf from 1.36.7 to 1.36.8.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-version: 1.36.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 04:38:43 +00:00
Rodrigo Campos
b27d6f3f1a Merge pull request #4856 from kolyshkin/criu-arm
CI: switch to packaged criu on arm
2025-08-19 11:35:22 -03:00
Kir Kolyshkin
96f4a90a6b Switch to packaged criu on arm
The issue on arm [1] is now fixed, so let's get back to using the
packaged criu version for most of the CI matrix.

This reverts commit 105674844e
("ci: use criu built from source on gha arm").

[1]: https://github.com/checkpoint-restore/criu/issues/2709

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-18 10:47:26 -07:00
Rodrigo Campos
d754fdaddf Merge pull request #4852 from kolyshkin/golangci-24x
ci: bump golangci-lint to v2.4.x
2025-08-18 09:46:51 -03:00
Kir Kolyshkin
9e0f989015 ci: bump golangci-lint to v2.4.x
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-17 15:40:58 -07:00
Akihiro Suda
37c6f6de70 Merge pull request #4850 from opencontainers/dependabot/github_actions/actions/checkout-5
build(deps): bump actions/checkout from 4 to 5
2025-08-17 13:04:41 +08:00
dependabot[bot]
cfb22c9a0f build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-15 16:40:45 +00:00
Aleksa Sarai
6b08448f6c merge #4844 into opencontainers/runc:main
Kir Kolyshkin (2):
  ci: use criu built from source on gha arm
  CI: switch to GHA for arm

LGTMs: rata cyphar
2025-08-16 02:39:17 +10:00
Kir Kolyshkin
105674844e ci: use criu built from source on gha arm
Currently, criu package from opensuse build farm times out on GHA arm,
so let's only use criu-dev (i.e. compiled from source on CI machine).

Once this is fixed, this patch can be reverted.

Related to criu issue 2709.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-12 14:48:05 -07:00
Kir Kolyshkin
1cf096803a CI: switch to GHA for arm
Since GHA now provides ARM, we can switch away from actuated.

Many thanks to @alexellis (@self-actuated) for being the sponsor of this
project.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-08-12 14:00:13 -07:00
dependabot[bot]
1398ba7eb0 Merge pull request #4845 from opencontainers/dependabot/go_modules/golang.org/x/net-0.43.0 2025-08-09 07:57:14 +00:00
dependabot[bot]
db26a717b9 build(deps): bump golang.org/x/net from 0.42.0 to 0.43.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.42.0 to 0.43.0.
- [Commits](https://github.com/golang/net/compare/v0.42.0...v0.43.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.43.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-09 07:19:22 +00:00
lfbzhm
c332250553 Merge pull request #4847 from opencontainers/dependabot/go_modules/golang.org/x/sys-0.35.0
build(deps): bump golang.org/x/sys from 0.34.0 to 0.35.0
2025-08-09 15:18:01 +08:00
dependabot[bot]
8f0bb87748 build(deps): bump golang.org/x/sys from 0.34.0 to 0.35.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.34.0 to 0.35.0.
- [Commits](https://github.com/golang/sys/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.35.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-09 06:55:58 +00:00
dependabot[bot]
e6313c010d Merge pull request #4846 from opencontainers/dependabot/go_modules/google.golang.org/protobuf-1.36.7 2025-08-09 06:54:41 +00:00
dependabot[bot]
bf33fe5fdb build(deps): bump google.golang.org/protobuf from 1.36.6 to 1.36.7
Bumps google.golang.org/protobuf from 1.36.6 to 1.36.7.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-version: 1.36.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-08 04:33:24 +00:00