Commit Graph

15285 Commits

Author SHA1 Message Date
Mike Brown
e54c86409c Merge pull request #11845 from containerd/dependabot/github_actions/lycheeverse/lychee-action-2.4.1
build(deps): bump lycheeverse/lychee-action from 2.4.0 to 2.4.1
2025-06-09 02:13:06 +00:00
Mike Brown
4d7381e47c Merge pull request #11927 from dmcgowan/enhance-transfer-unpack-selection
Update transfer supported platforms logic
2025-06-09 02:11:51 +00:00
Mike Brown
4bcd549f74 Merge pull request #11946 from thaJeztah/oci_privileged_no_var
pkg/oci: don't use var for WithPrivileged
2025-06-09 02:00:28 +00:00
Mike Brown
d123295973 Merge pull request #11886 from ningmingxiao/err_log
shim-v2:improve shim error message
2025-06-09 01:52:12 +00:00
Akihiro Suda
cd0f2cc23a Merge pull request #11945 from thaJeztah/oci_no_vars_for_funcs
pkg/oci: don't use vars for WithAllKnownCapabilities, WithAllCurrentCapabilities
2025-06-08 06:19:37 +00:00
Fu Wei
eeb9065242 Merge pull request #11916 from fuweid/fix-11871
*: properly shutdown non-groupable shims to prevent resource leaks
2025-06-08 00:16:29 +00:00
Maksym Pavlenko
a6c250ed77 Merge pull request #11938 from thaJeztah/oci_linting
pkg/oci: fix minor linting issues
2025-06-06 22:21:33 +00:00
Phil Estes
3e4d108551 Merge pull request #11947 from kiashok/update-windows-ci
Enable CIs to run on WS2022 and WS2025
2025-06-06 17:21:24 +00:00
Kirtana Ashok
2f1948a503 Enable CIs to run on WS2022 and WS2025
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2025-06-05 15:25:03 -07:00
Phil Estes
41209bd1c2 Merge pull request #11900 from containerd/dependabot/go_modules/google.golang.org/grpc-1.72.2
build(deps): bump google.golang.org/grpc from 1.72.0 to 1.72.2
2025-06-05 17:11:21 +00:00
Phil Estes
0bf07cd5c6 Merge pull request #11939 from thaJeztah/oci_rm_go116
pkg/oci: remove compatibility code for go1.16 and older
2025-06-04 15:02:30 +00:00
Phil Estes
0325f61e10 Merge pull request #11941 from thaJeztah/oci_test_cleans
pkg/oci: cleanup some tests
2025-06-04 15:02:16 +00:00
Sebastiaan van Stijn
8de612020e pkg/oci: don't use var for WithPrivileged
This variable was introduced in 062c3a00ef,
which didn't describe it as intentional to be able to override the option.

Based on the above, I assume the use of a variable was purely convenience,
the there's no intent for packages to be able to override them, so this
patch changes these to be a regular function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-04 16:35:13 +02:00
Sebastiaan van Stijn
d72c21450f pkg/oci: don't use vars for WithAllKnownCapabilities, WithAllCurrentCapabilities
These were introduced in c818a6b13d, refactored
in 808b223536 and bdd84abf05,
and moved in a2d1a8a865, but none provided
a motivation for using a variable / alias for these.

Based on the above, I assume the use of a variable was purely convenience,
the there's no intent for packages to be able to override them, so this
patch changes these to be a regular function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-04 16:10:41 +02:00
Sebastiaan van Stijn
ac3c3ad5da pkg/oci: cleanup some tests
- Use testify for asserting
- Fix various unhandled errors
- Use native t.TempDir() for temporary files

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-04 13:42:09 +02:00
Sebastiaan van Stijn
4de598d94b pkg/oci: remove compatibility code for go1.16 and older
These were added as part of b7f673790f,
to provide backward compatibility with go1.16, which we no longer
supports, so we can remove this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-04 12:52:40 +02:00
Sebastiaan van Stijn
17c632e785 pkg/oci: fix minor linting issues
- remove redundant aliases for imports
- rename variables that shadowed imports
- use errors.Is instead of straight error comparing

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-04 12:45:57 +02:00
Akihiro Suda
bcd000f443 Merge pull request #11578 from djdongjin/image-volume-subpath
[KEP-4639] Support image volume mount subpath
2025-06-04 04:11:09 +00:00
Fu Wei
fc965444b1 Merge pull request #11881 from djdongjin/fix-TestExportAndImportMultiLayer-flaky
Fetch image with default platform only in TestExportAndImportMultiLayer
2025-06-04 03:28:42 +00:00
Fu Wei
280c7c6fcf Merge pull request #11934 from erofs/erofs-snapshotter
erofs-snapshotter: fix to work with wrapped errors
2025-06-04 02:04:15 +00:00
Jin Dong
cff8184ffb support image volume sub path
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-06-03 21:53:29 -04:00
Fu Wei
e1b3cfadfa Merge pull request #11915 from dmcgowan/fix-transfer-differ-selection
Fix transfer differ selection
2025-06-04 00:46:02 +00:00
Gao Xiang
a8658a7081 erofs-snapshotter: fix to work with wrapped errors
Commit fb6dd2cf15 ("client:improve mount error message") changed
the return value into a wraped error message, which causes the
ENOTBLK check doesn't work.

Reported-by: Aadhar Agarwal <aadagarwal@microsoft.com>
Fixes: https://github.com/containerd/containerd/pull/11861
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2025-06-04 07:34:19 +08:00
Derek McGowan
4f7c69ae67 Update differ selection in transfer service to prefer default
Currently the erofs differ will be chosen and cause pulls to fail with
not implemented errors.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-02 22:54:30 -07:00
Derek McGowan
21f0595b9b Add debug log when transfer returns not implemented
Currently the error details are not included in the output error and
there is no log. One of the reasons a the transferer was skipped could
be do to a specific component which is not implemented (such as trying
to use erofs differ) or unsupported image (pulling schema1). This
information is useful to find a bad configuration.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-02 22:50:00 -07:00
Derek McGowan
d9bb00578e Add more error details when unpack fails to extract
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-02 22:49:59 -07:00
Fu Wei
f482992fdc Merge pull request #11911 from dmcgowan/transfer-internal-interface
Remove internal interface from unpacker interface
2025-06-03 01:37:22 +00:00
Phil Estes
7b895bea33 Merge pull request #11914 from henry118/dedup
Enable DuplicationSuppressor in transfer service
2025-06-03 01:08:07 +00:00
Phil Estes
aa6cce6c07 Merge pull request #11878 from azr/fix-import-local-transfer-svc
fix import for local transfer service
2025-06-03 01:07:31 +00:00
Derek McGowan
48cec3659f Update transfer supported platforms logic
Allow selection of a non-default snapshotter when no unpack
snapshotter is specified.

Add more logging to help figure out why an unpack configuration is not
used.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-02 15:40:54 -07:00
Wei Fu
1ac97c2c13 *: properly shutdown non-groupable shims to prevent resource leaks
Previously, to address issue #11708, PR #11793 changed containerd to always
invoke the shim binary to establish shim connections, rather than reusing the
sandbox shim. However, this change did not ensure that the Shutdown API was
called to stop the shim process.

Starting with containerd v2.0.0, the Shutdown API is only invoked for sandbox
containers (when container.SandboxID is empty). This approach works for
groupable shims, where multiple containers share a single socket address and
only require a single Shutdown call. However, for non-groupable shims, each
container requires its own Shutdown call during cleanup to avoid leaking shim
processes.

Additionally, PR #11793 introduced a corner case during upgrades:
- T1: An old container-shim-runc-v2 (<=v1.7.X) is running for pod A.
- T2: containerd is upgraded to v2.X.Y.
- T3: A new container A-C1 is created in pod A using the new shim-runc-v2 binary.
- T4: bootstrap.json indicates version:3 protocol, but it is downgraded to version:2 in memory.
- T5: containerd is restarted.
- T6: containerd fails to connect to A-C1.
- T7: The A-C1 container is left in EXITED status in the CRI plugin.

To address this, ensure that loadShimTask downgrades to version:2 if necessary,
and always invoke the Shutdown API for each non-groupable shim during cleanup to
prevent resource leaks and handle upgrade scenarios correctly.

(Introduced by #11793)

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2025-06-02 00:01:08 -04:00
Henry Wang
1282299751 Enable DuplicationSuppressor in transfer service
Signed-off-by: Henry Wang <henwang@amazon.com>
2025-05-29 22:28:43 +00:00
Derek McGowan
00edba6aa8 Remove internal interface from unpacker interface
Avoid using internal interfaces for exported types and always prefer
using interfaces over structs to limit unused imports.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-05-28 14:23:24 -07:00
Adrien Delorme
77562a8e4a fix import for local transfer service
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
2025-05-28 11:55:30 +02:00
Mike Brown
e393f41d20 Merge pull request #11823 from djdongjin/go-mod-1.24
Bump up go version to 1.24 and cri-api to 0.33.0
2025-05-27 20:43:13 +00:00
dependabot[bot]
a93c8d3cd1 build(deps): bump google.golang.org/grpc from 1.72.0 to 1.72.2
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.72.0 to 1.72.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.72.0...v1.72.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-26 23:57:18 +00:00
dependabot[bot]
4a2c402230 build(deps): bump lycheeverse/lychee-action from 2.4.0 to 2.4.1
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](1d97d84f0b...82202e5e9c)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-version: 2.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-24 08:34:12 +00:00
Maksym Pavlenko
f6724ac319 Merge pull request #11883 from dmcgowan/transfer-pull-image-desc
Add descriptor to transfer pull image events
2025-05-23 20:36:32 +00:00
Maksym Pavlenko
909a5882d1 Merge pull request #11813 from jokemanfire/panic
fix(container_create): if sandboxConfig's metadata is nil will panic
2025-05-23 20:36:09 +00:00
Derek McGowan
663fa9d92b Merge pull request #11888 from austinvazquez/fix-v2.1.0-release-link
docs: fix v2.1.0 release link
2025-05-24 05:15:56 +08:00
Austin Vazquez
ee85517b19 docs: fix v2.1.0 release link
Signed-off-by: Austin Vazquez <austin.vazquez.dev@gmail.com>
2025-05-23 14:55:00 -06:00
Jin Dong
e57b9f751a dep: bump up k8s.io/cri-api to 0.33.0
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-05-23 19:37:02 +00:00
Jin Dong
a4dd2b8f2a go.mod: bump up go to 1.24.3
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-05-23 19:37:02 +00:00
Jin Dong
b9a29bdb99 ci: bump up go to 1.24.3
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-05-23 19:36:58 +00:00
Maksym Pavlenko
a60fd18ccd Merge pull request #11839 from vvoland/seccomp-6.13
seccomp: kernel v6.13 (libseccomp v2.6.0)
2025-05-23 19:07:50 +00:00
Derek McGowan
f6ae79a0b6 Merge pull request #11834 from austinvazquez/bump-golang-versions-05062025-in-ci
ci: bump golang [1.23.9, 1.24.3] in build and release
2025-05-23 16:56:39 +00:00
ningmingxiao
811d044229 shim-v2:improve shim error message
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2025-05-22 23:20:44 +08:00
Akihiro Suda
b337c00d66 Merge pull request #11861 from ningmingxiao/mount_err_detail
client:improve mount error message
2025-05-22 04:28:56 +00:00
Derek McGowan
b03191abad Merge pull request #11874 from dmcgowan/symlink-override-breakout
Add symlink breakout test for overriden path
2025-05-22 00:20:05 +00:00
Derek McGowan
6e17198f07 Add descriptor to transfer pull image events
Include the descriptor for the image target on image events.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-05-21 17:04:44 -07:00