Commit Graph

16473 Commits

Author SHA1 Message Date
Gao Xiang
b9445fb9ef erofs-differ: support zstd-wrapped EROFS layers
Although EROFS has native compression support (and each filesystem can
contain multiple compression algorithms), in many cases, people only
consider using zstd compression when transporting on the wire in order
to reduce the pulling time but maintain the optimal runtime performance.

Only `+zstd` is considered: it has skippable frames which will be used
for the seekable EROFS implementation in future containerd versions.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2026-04-13 01:38:45 +08:00
Maksym Pavlenko
1d9fd7e2c7 Merge pull request #13131 from fletcherw/nil-spec
fix: handle nil spec for hostNetwork containers
2026-04-02 02:14:35 +00:00
Fu Wei
1f0b0c442b Merge pull request #13091 from erofs/os_features
Add `os.features` support for EROFS native container images
2026-04-01 23:14:34 +00:00
Maksym Pavlenko
3a272ca5a1 Merge pull request #13141 from containerd/dependabot/github_actions/github/codeql-action-4.35.1
build(deps): bump github/codeql-action from 4.33.0 to 4.35.1
2026-04-01 20:14:26 +00:00
Maksym Pavlenko
c45c88624b Merge pull request #13142 from containerd/dependabot/go_modules/github.com/pelletier/go-toml/v2-2.3.0
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.4 to 2.3.0
2026-04-01 20:12:56 +00:00
Gao Xiang
940076477e client/image: check if the snapshotter supports forcely if os.feature is set
If no snapshotter is specified, container run selects the default
snapshotter.

However, if `os.features` is set, we should always call
`checkSnapshotterSupport()`.  This ensures containerd clients
report a clear error:

```
ctr: snapshotter overlayfs does not support platform
{amd64 linux  [erofs] } for image sha256:[]
```

instead of the confusing layer extraction error:

```
ctr: apply layer error for "": failed to extract layer sha256:[]:
failed to get stream processor for application/vnd.erofs.layer.v1:
no processor for media-type
```

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2026-04-01 13:18:27 +08:00
Gao Xiang
f8367b8ad2 client: remove toPlatforms()
Just use apitypes.OCIPlatformFromProto().

Suggested-by: Jin Dong <djdongjin95@gmail.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2026-04-01 13:18:27 +08:00
Gao Xiang
cb93966b9f transfer: Default to the EROFS snapshotter and differ for EROFS images
If no snapshotter is specified and `os.features` contains "erofs",
unpacking should use the EROFS snapshotter and differ.

This enhances the usability of native EROFS container images.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2026-04-01 13:18:23 +08:00
Gao Xiang
146930e91d api: add os_features to api/types/platform.proto
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2026-04-01 13:13:11 +08:00
Gao Xiang
56a6fdbe5b Update github.com/containerd/platforms to v1.0.0-rc.4
In order to support `os.features`.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2026-04-01 13:12:55 +08:00
Maksym Pavlenko
e78d26ee12 Merge pull request #12962 from containerd/dependabot/github_actions/actions/upload-artifact-7.0.0
build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0
2026-04-01 04:39:38 +00:00
Maksym Pavlenko
f7a6bdf157 Merge pull request #12964 from containerd/dependabot/github_actions/actions/attest-build-provenance-4.1.0
build(deps): bump actions/attest-build-provenance from 3.2.0 to 4.1.0
2026-04-01 04:38:54 +00:00
Akihiro Suda
c3381c2e8a Merge pull request #12502 from aadhar-agarwal/aadagarwal/integrate-with-goverity
Add dmverity support to the erofs snapshotter using go-dmverity
2026-04-01 02:45:24 +00:00
Samuel Karp
40249d13a3 Merge pull request #13090 from SergeyKanzhelev/go126
Bump Go to 1.26.0
2026-03-31 23:53:05 +00:00
Maksym Pavlenko
ac77420204 Merge pull request #13144 from chrishenzie/update-crun-1.27
Update crun version to 1.27 and enable in mount options test
2026-03-31 23:48:48 +00:00
Maksym Pavlenko
d2b31e9826 Merge pull request #13134 from thaJeztah/denoise
core/remotes: MakeRefKey: update godoc and change Warn to Debug logs
2026-03-31 23:44:43 +00:00
Maksym Pavlenko
43d906b6ff Merge pull request #13117 from HASidd/log-trace
tracing: add option to inject trace ID into logrus fields
2026-03-31 23:44:09 +00:00
Maksym Pavlenko
ae04fbd2e1 Merge pull request #13140 from containerd/dependabot/github_actions/azure/CLI-3.0.0
build(deps): bump azure/CLI from 2.2.0 to 3.0.0
2026-03-31 23:40:50 +00:00
Sergey Kanzhelev
0130ae9aa8 Bump Go to 1.26.0
This change updates the Go version from 1.25.8 to 1.26.0 across the
repository, including CI configurations, build scripts, and development
environments.

It also fixes two linter issues discovered after upgrading the Go version:
- core/snapshots/storage/bolt.go: incorrect printf format for uint64
- plugins/transfer/plugin.go: incorrect printf format for int and unused variable

The golangci-lint version in script/setup/install-dev-tools is also updated to v2.9.0
to match CI.

Signed-off-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2026-03-31 22:58:42 +00:00
Aadhar Agarwal
50f5461fb7 Add dmverity support to the erofs snapshotter using veritysetup-go
Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
2026-03-31 20:21:39 +00:00
Akihiro Suda
98c66b0429 Merge pull request #13105 from containerd/dependabot/github_actions/azure/login-3.0.0
build(deps): bump azure/login from 2.3.0 to 3.0.0
2026-03-31 17:38:22 +00:00
Chris Henzie
9f62f84c5d Update crun version to 1.27 and enable in mount options test
Updates crun version used by integration tests to 1.27 and enables the
test for cgroup mount options in
TestPrivilegedContainerCgroupMountOptions.

Assisted-by: Antigravity
Signed-off-by: Chris Henzie <chrishenzie@gmail.com>
2026-03-31 10:38:01 -07:00
Maksym Pavlenko
b6d00e881b Merge pull request #13106 from containerd/dependabot/github_actions/actions/cache-5.0.4
build(deps): bump actions/cache from 5.0.3 to 5.0.4
2026-03-31 17:30:06 +00:00
dependabot[bot]
44f01d4e71 build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.4 to 2.3.0
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.4 to 2.3.0.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.4...v2.3.0)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-version: 2.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 23:30:10 +00:00
dependabot[bot]
1be404a955 build(deps): bump github/codeql-action from 4.33.0 to 4.35.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.33.0 to 4.35.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b1bff81932...c10b8064de)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 23:30:08 +00:00
dependabot[bot]
0ffd99a0e0 build(deps): bump azure/CLI from 2.2.0 to 3.0.0
Bumps [azure/CLI](https://github.com/azure/cli) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/azure/cli/releases)
- [Changelog](https://github.com/Azure/cli/blob/master/ReleaseProcess.md)
- [Commits](9f7ce6f37c...9eb25b8360)

---
updated-dependencies:
- dependency-name: azure/CLI
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 23:29:49 +00:00
Davanum Srinivas
6ebe1ce6ab Merge pull request #13138 from dims/fix-usage-nanocores-window
cri: mirror cadvisor UsageNanoCores semantics
2026-03-30 20:52:12 +00:00
Samuel Karp
b7a467e4f3 Merge pull request #12175 from smira/fix/hide-go-cmp
fix: hide `go-cmp` library from the non-test code path
2026-03-30 20:21:10 +00:00
Akihiro Suda
6667c769ec Merge pull request #12518 from HirazawaUi/support-hostnetwork-userns
feat: Allow containers to use both host network and user namespace
2026-03-30 15:37:42 +00:00
HirazawaUi
339b0cc171 add integration test
Signed-off-by: HirazawaUi <695097494plus@gmail.com>
2026-03-30 09:01:49 -05:00
HirazawaUi
7d7c56357a add unit tests
Signed-off-by: HirazawaUi <695097494plus@gmail.com>
2026-03-30 09:01:49 -05:00
HirazawaUi
93cf5418b9 Allow user namespace with hostNetwork in container
Signed-off-by: HirazawaUi <695097494plus@gmail.com>
2026-03-30 09:01:49 -05:00
Davanum Srinivas
66a1d3a607 cri: mirror cadvisor UsageNanoCores semantics
Mirror cAdvisor's instantaneous CPU rate behavior for CRI stats.

Compute UsageNanoCores from the latest two samples only, and leave the field unset when there is not yet enough data to calculate an instantaneous rate. This avoids publishing an authoritative zero before a valid rate exists while keeping containerd aligned with cAdvisor semantics.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-03-28 14:31:20 -04:00
Sebastiaan van Stijn
55f622c763 core/remotes: MakeRefKey: update godoc and change Warn to Debug logs
Scary warnings were printed for any mediaType that wasn't mapped;

    INFO[2026-03-10T11:39:45.677430346Z] Docker daemon                                 commit=83bca51 containerd-snapshotter=true storage-driver=overlayfs version=29.3.0
    ...
    INFO[2026-03-10T11:39:45.689383471Z] API listen on /var/run/docker.sock
    WARN[2026-03-10T11:40:32.382484965Z] reference for unknown type: application/vnd.oci.empty.v1+json  digest="sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" mediatype=application/vnd.oci.empty.v1+json size=2
    WARN[2026-03-10T11:40:32.445406215Z] reference for unknown type: application/vnd.oci.empty.v1+json
    WARN[2026-03-10T11:40:32.695256132Z] reference for unknown type: application/vnd.dev.sigstore.bundle.v0.3+json  digest="sha256:7e8cf55036d9be9d6a0d720a2e78468401cc0e01946dbbcb1cd7622ae854a0a3" mediatype=application/vnd.dev.sigstore.bundle.v0.3+json size=10491
    WARN[2026-03-10T11:40:32.695314215Z] reference for unknown type: application/vnd.oci.empty.v1+json  digest="sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" mediatype=application/vnd.oci.empty.v1+json size=2
    WARN[2026-03-10T11:40:32.745608673Z] reference for unknown type: application/vnd.dev.sigstore.bundle.v0.3+json
    WARN[2026-03-10T11:40:32.745629632Z] reference for unknown type: application/vnd.oci.empty.v1+json
    WARN[2026-03-10T11:40:32.845403049Z] reference for unknown type: application/vnd.dev.sigstore.bundle.v0.3+json
    WARN[2026-03-10T11:40:32.945182007Z] reference for unknown type: application/vnd.dev.sigstore.bundle.v0.3+json
    INFO[2026-03-10T11:40:34.714635924Z] image pulled                                  digest="sha256:37539dd4d60fc70968d164d3850d903a2c56f6402214a1953fbf9fcb81ada731" remote="docker.io/moby/buildkit:latest

These cases are not actionable by the user, and not critical, so let's change
them to a debug-message, but add more context. Also update the GoDoc for this
function to better cover its functionality.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-03-27 11:50:27 +01:00
Fletcher Woodruff
b32cecd318 fix: handle nil spec for hostNetwork containers
When running hostNetwork containers with the shim sandboxer, the spec
passed to NewBundle is never initialized to a typed nil and is instead a
bare golang nil. Fix this by guarding the dereference to avoid crashing
when such a container is created.

Signed-off-by: Fletcher Woodruff <fwood@amazon.com>
2026-03-26 20:06:00 +00:00
Maksym Pavlenko
131286b177 Merge pull request #13114 from SergeyKanzhelev/critestSmallSfriptFix
allow to pass multiple extra arguments to critest
2026-03-26 19:23:24 +00:00
Maksym Pavlenko
546ce38287 Merge pull request #13115 from henry118/bug-13030-2
Tweak mount info for overlayfs in case of parallel unpack
2026-03-25 20:12:51 +00:00
Maksym Pavlenko
1abba0c961 Merge pull request #13017 from jzhn/main
fix: avoid content storage pollution by limiting the fallback on ref resolution
2026-03-25 19:08:53 +00:00
Maksym Pavlenko
18201e7d52 Merge pull request #12861 from jedevc/docker-require-explicit-digest
chore: Add explicit digest requirement to docker pusher
2026-03-25 18:37:26 +00:00
Maksym Pavlenko
341c648ddb Merge pull request #12968 from dmcgowan/fix-send-stream-data-with-eof
Fix send stream data with EOF
2026-03-25 18:01:59 +00:00
Justin Chadwell
4f35b756e2 chore: Add explicit digest requirement to docker pusher
The `push` function below assumes that digest and mediatypes are
populated and set. If they aren't, then the requests made are malformed,
attempting to invoke `HEAD /blobs/` (instead of `HEAD /blobs/<digest>`).
Additionally, if we *were* to move past this point, we'd then populate
an empty digest in the query parameter, and even provide invalid HTTP
mediatypes.

However, the `WithDescriptor` `WriterOpt` specifically notes that "Write
does not require any field of desc to be set". It's very easy for the
caller to read this as an optional field, to skip it, and then get
confusing HTTP errors from inside the `push` function.

We can avoid this by explicitly validating that the descriptor is valid
and provide early feedback.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2026-03-25 10:56:00 -07:00
Maksym Pavlenko
1f53afde61 Merge pull request #12557 from aadhar-agarwal/aadagarwal/filter-X-containerd
core/mount: Reject X-containerd.* options before kernel mount
2026-03-25 17:55:21 +00:00
Samuel Karp
c4f7fa1dd2 Merge pull request #13118 from chrishenzie/cri-update-pod-sandbox
Wire UpdatePodSandboxResources to Sandbox API
2026-03-25 01:24:26 +00:00
Samuel Karp
b57484afbd Merge pull request #13113 from HASidd/otel
Propagate OpenTelemetry traces in outgoing RPCs from plugin clients
2026-03-24 23:52:02 +00:00
Chris Henzie
33db836a8b Wire UpdatePodSandboxResources to Sandbox API
Integrates CRI container resource updates with core Sandbox API plugin.
Delegates payload to out-of-tree controllers via UpdateSandbox API.
Gracefully tolerates ErrNotImplemented to preserve backwards
compatibility for legacy sandboxers.

Assisted-by: Antigravity
Signed-off-by: Chris Henzie <chrishenzie@gmail.com>
2026-03-24 15:50:49 -07:00
Chris Henzie
e6c7f37235 Add unit tests for CRI resource updates
Provides test coverage for existing UpdatePodSandboxResources behavior.

Assisted-by: Antigravity
Signed-off-by: Chris Henzie <chrishenzie@gmail.com>
2026-03-24 15:41:38 -07:00
Samuel Karp
248b1a665b Merge pull request #12952 from chrishenzie/mount-option-removal
Preserve cgroup mount options for privileged containers
2026-03-24 22:04:09 +00:00
Hasan Siddiqui
10c30fb74a tracing: add option to inject trace ID into logrus fields
Introduce functional options to NewLogrusHook to allow optional Trace ID
injection into log fields. This enables log-trace correlation via the
[debug] config without breaking existing external consumers of
pkg/tracing.

Signed-off-by: Hasan Siddiqui <hasiddiqui@google.com>
2026-03-24 21:51:27 +00:00
Henry Wang
3382fb7162 Tweak mount info for overlayfs in case of parallel unpack
Signed-off-by: Henry Wang <henwang@amazon.com>
2026-03-24 18:43:07 +00:00
Henry Wang
68e128cf03 Add integration test for issue 13030
Signed-off-by: Henry Wang <henwang@amazon.com>
2026-03-24 18:03:26 +00:00