Commit Graph
17231 Commits
Author SHA1 Message Date
Phil Estes bb5988d3d1 Merge pull request #14058 from thaJeztah/bump_otels
chore(deps): go.opentelemetry.io/otel v1.46.0, contrib v0.71.0
api/v1.12.0-rc.0
2026-08-28 14:17:21 +00:00
Phil Estes 00d493b1db Merge pull request #14060 from thaJeztah/bump_cdi
vendor: tags.cncf.io/container-device-interface 73444d1f71f2
2026-08-28 14:15:56 +00:00
Sebastiaan van Stijn ea60594619 vendor: tags.cncf.io/container-device-interface 73444d1f71f2
full diff https://github.com/cncf-tags/container-device-interface/compare/04278701a635...73444d1f71f20b3e6ff785585ec7321c79c94912

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-28 15:27:36 +02:00
Fu Wei 1335870fbc Merge pull request #14057 from thaJeztah/rm_stray_logrus_imports
plugins: remove some stray logrus imports
2026-08-28 02:01:29 +00:00
Fu Wei 0d966372d6 Merge pull request #14012 from crunchloop/erofs-snapshotter-os-feature
snapshots/erofs: advertise the erofs OS feature from the snapshotter plugin
2026-08-28 01:51:40 +00:00
Derek McGowan d18d1b5913 Merge pull request #13883 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.24.1
build(deps): bump github.com/prometheus/client_golang from 1.24.0 to 1.24.1
2026-08-27 23:21:46 +00:00
Derek McGowan 30070a910a Merge pull request #14047 from dmcgowan/prepare-api-1-12-rc
Prepare api/v1.12.0-rc.0 release
2026-08-27 23:20:58 +00:00
Sebastiaan van Stijn bfe115abe8 chore(deps): go.opentelemetry.io/otel v1.46.0, contrib v0.71.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-27 23:59:28 +02:00
Mike Brown 7e66a3f76a Merge pull request #14051 from mikebrow/move-kubernetes-up-to-v1.37
update kubernetes to v1.37.0
2026-08-27 21:10:34 +00:00
Sebastiaan van Stijn b845501327 plugins: remove some stray logrus imports
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-27 22:44:35 +02:00
Mike Brown 67336d701d modifies criSignalToOCIStopSignal to remove the extra cri SIGNAL_ prefixes
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2026-08-27 15:24:24 -05:00
Mike Brown 00ecad3d7a resolve lint issue upstreamcri.NewRemoteImageService() is deprecated
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2026-08-27 15:24:24 -05:00
Mike Brown ee09726316 fix for cri api Signal_ to Signal_SIGNAL_
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2026-08-27 15:24:24 -05:00
Mike Brown 52be09ef1c update kubernetes to v1.37.0
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2026-08-27 15:24:24 -05:00
Maksym Pavlenko 051118d229 Merge pull request #14036 from mxpv/shim-telemetry
Pass tracing context from shim to runc and hooks
2026-08-27 18:35:45 +00:00
Martín Fernández 988f113ab7 snapshots/erofs: test the advertised erofs feature platform
The preceding commit advertises the default platform with the erofs OS feature. Move construction of that platform set into snapshotterPlatforms so the client-side matching contract can be tested without changing the advertisement.

EROFS identifies the image layer package format rather than a Linux-only host capability, so the feature-bearing entry remains derived from platforms.DefaultSpec. Test that the advertised set matches both the plain default platform and the same platform carrying the erofs feature.

Assisted-by: Claude Opus 5

Signed-off-by: Martín Fernández <mfernandez@crunchloop.io>
2026-08-27 15:07:35 -03:00
Maksym Pavlenko a9eb76fb19 Merge pull request #14020 from fuweid/retryable-delete-shim-api
runtime: make task.Delete API retriable
2026-08-27 00:41:19 +00:00
Derek McGowan d767f44b52 Prepare api/v1.12.0-rc.0 release
Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 16:03:14 -07:00
Samuel Karp c2171cb918 Merge pull request #14042 from thaJeztah/bump_grpc
vendor: google.golang.org/grpc v1.83.2
2026-08-26 22:52:27 +00:00
Samuel Karp 33f2278e41 Merge pull request #14043 from thaJeztah/bump_cdi
vendor: tags.cncf.io/container-device-interface 04278701a635
2026-08-26 22:50:18 +00:00
Wei Fu 24dc6900ec runtime: make task.Delete API retriable
To make task.Delete retriable, this patch caches the delete result in
memory after the shim successfully deletes the task. If a later shutdown
attempt fails, a subsequent Delete retry can complete cleanup and return the
cached exit information.

If containerd restarts after deleting the task, the in-memory cache is lost,
and containerd will publish TaskExit and TaskDelete events again to
subscribers. Currently, the exit status returned by shim-delete is always
137. In a follow-up, containerd-shim-runc-v2 should store the actual exit
status in the state directory, so that shim-delete can reuse it instead of
returning a hard-coded value.

Implements: #8981

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-08-26 18:10:43 -04:00
dependabot[bot] 5e89a2c119 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.24.0 to 1.24.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.24.0...v1.24.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-version: 1.24.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-26 20:02:11 +00:00
Fu Wei 341a4e081b Merge pull request #14002 from dmcgowan/shim-mount-handler-protocol
Shim mount handler protocol
2026-08-26 19:25:28 +00:00
Derek McGowan fbd9f37c2d docs: document the transform suffix rule
Neither doc previously said how much of a claimed transform chain is
actually honored; a reader could assume claiming any transform in a
chain was sufficient on its own. State the suffix rule plainly, with
the format/mkdir/overlay example the code itself now enforces, and
call out that format in particular can only ever be claimed as part
of a suffix that covers what follows it, never alone, since it
resolves mount points internal to the mount manager.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan aedbd24669 docs: document the shim mount capability
Add a registry entry for the containerd.types.MountCapabilities extension,
and update the mount and bootstrap protocol docs for extensions replacing
the reserved-for-future-use capabilities field, and for the removal of the
runtime-allow-mounts annotation and the "/*" transform convention.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan 1ff0c13859 runtime/v2: migrate early adopters of the deprecated annotation
Kata's EROFS snapshotter shim set containerd.io/runtime-allow-mounts
before the MountCapabilities bootstrap extension existed
(https://github.com/kata-containers/kata-containers/pull/12763), so
removing the annotation outright would break it and anyone else who
adopted it early with no migration window.

Rather than keep the annotation as a first-class, permanently
supported mechanism, confine falling back to it in
task_mounts_deprecated.go: when a shim's bootstrap result carries no
MountCapabilities extension, its runtime name is checked against the
annotation as a migration path, with the result cached per runtime
name for the life of the daemon, same as the removed mechanism did.
Two runtimes known to never set it, runc.v2 and runhcs.v1, are
skipped outright rather than queried.

The extension stays authoritative whenever a shim provides it: this
fallback only runs in its absence, and is confined to one file so it
can be deleted outright once known early adopters have migrated.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan d3cc320650 runtime/v2: propagate shim mount capabilities to sandbox members
When a container joins an existing sandbox via a Task API address supplied
directly by the sandbox controller (rather than by restoring
bootstrap.json), ShimManager.Start synthesized a BootstrapResult carrying
only the version, protocol and address. A shim that advertised
MountCapabilities at sandbox startup was therefore treated as if it had
advertised nothing for every container that joins the sandbox this way,
silently ignoring mount handling it explicitly claimed.

Recover the extensions from the sandbox's shim instance, which containerd
already holds in memory, via the existing shimCapabilities interface. This
is best effort: an external sandboxer whose shim instance containerd does
not track degrades to no extensions rather than failing sandbox startup,
matching today's behavior.

Reported independently by fuweid and Copilot on containerd/containerd#14002.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan e8963fc32b runtime/v2: negotiate mount capabilities from shim bootstrap
A shim declared the mount types it performs itself through the annotation
removed in an earlier commit, discovered by invoking the shim binary a
second time with -info. Read them instead from the MountCapabilities
extension a shim advertises in its bootstrap result, which is already
available from the shim start that Create() performs anyway.

This requires starting the shim before activating the task's mounts.
Starting a shim does not need the rootfs; only the task.Create call
consumes it. Reordering means a failure after the shim has started must
now tear the shim down, so the teardown that was inlined in the
task.Create error path becomes a deferred cleanup covering the whole
window, reusing the existing cleanupShimTask helper. That defer is
registered after the mount deactivation defer so that the shim, which
may still be using the mounts, is stopped first.

Extract the mount activation logic into a new taskMountController in
task_mounts.go, rather than growing it further inline in Create(): it
already has its own state transitions (owned vs. reused activation,
NotImplemented, AlreadyExists) independent of shim startup, and this
keeps that reasoning testable without spawning a shim.

Also fix two latent nil pointer dereferences: Create() and Delete() both
called the mount.Manager interface directly with no nil check, which
panics whenever the mount manager plugin is not registered.
taskMountController.Activate and Deactivate treat a nil manager as
nothing to do.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan 0b641f0099 mount: honor a claimed transform as a chain suffix
A claimed transform was recorded but never actually left unapplied:
every parsed transformer in a mount's chain was applied in full
regardless of what the caller had claimed, so a shim advertising it
performs "mkdir" in "format/mkdir/overlay" never got the chance to,
since the manager silently applied it anyway. This predates the shim
capability protocol — it was reachable before through the "format/*"
annotation convention — but this series turns it into a documented,
supported way for a shim to claim a transform, so a shim relying on it
(at least one is: Kata's EROFS snapshotter shim, per its annotation
usage) would find its claim silently ignored.

A claimed transform can only be honored as a suffix of the chain: each
transform's input is the previous one's output, so an outer, unclaimed
transform must still be applied even when an inner one is claimed,
since the inner one cannot run without it. planActivation now tracks,
per mount, how much of its chain — starting from the beginning — the
manager must apply itself: through the last unclaimed transform, which
by construction covers every transform before it too. Applying only
that prefix and returning the true, contiguous claimed suffix to the
caller is what actually makes the claim meaningful. This is only
observable for mounts[firstSystemMount], the one mount partially
transformed by the manager and returned to the caller to finish; every
earlier mount is fully internal to the manager and was, and remains,
always fully transformed regardless of any claim.

While changing this expression, also guard it against the case where
firstSystemMount reaches len(mounts) — every mount consumed inside the
manager, with no system mount left to transform — which indexes out of
range today. This is a distinct, pre-existing latent panic (for
example, reachable via WithTemporary combined with a transformed mount
type), tracked separately from the claim-handling fix above; guarding
it here only prevents a crash newly reachable by touching this line,
it does not address the mount.ActivationInfo.System non-empty
invariant that scenario also violates.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan 8ba69faf06 mount: extract activation planning
Activate's planning phase — deciding, for each mount, which transforms
the manager must apply and whether the manager or the caller performs
the mount itself — was inline in a bolt transaction spanning hundreds
of lines, and every existing test of it goes through the full Activate
path, which needs root to mount anything for real.

Extract it into planActivation, a pure function of the mount list,
activation options, and registered transforms/handlers. No behavior
change; this is what makes the next commit's fix testable without
root.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan 00967ecf03 mount: add WithAllowTransform activate option
A caller that applies a mount transform itself had to say so by naming the
mount type "format/*", a sentinel the mount manager constructs internally
by concatenating a transform name with "/*". Both sides had to
independently know and agree on that convention, and the resulting string
is neither a mount type nor a transform name.

Add AllowTransforms, and WithAllowTransform to set it, so a transform can
be claimed by its own name instead. The "/*" convention is removed rather
than kept as a second accepted spelling: it existed only to be produced by
the runtime-allow-mounts annotation, which is removed in an earlier commit
in this series, and there is no other producer of it in this tree.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan 6d9307f346 runtime/v2: decode the whole bootstrap result from JSON
parseStartResponse decodes a JSON bootstrap response into the deprecated
three-field client.BootstrapParams, so every other field of BootstrapResult
is silently discarded.

This is reached when reloading a bundle: writeBootstrapParams stores
bootstrap.json with encoding/json, and readBootstrapParams parses it back
through here. It matters once BootstrapResult carries extensions, because a
container joining an existing sandbox shim recovers that shim's result from
bootstrap.json rather than from a fresh shim start, and so would have seen
none of them.

Decode into BootstrapResult instead. The stored format does not change and
neither reader nor writer changes what it produces; encoding/json already
round-trips every field, including extensions, whose Any is an opaque type
URL and byte slice to it and so needs no type resolution, and including a
capability value this version of containerd does not define, which must
survive rather than being silently dropped.

This also removes the last use of the deprecated client.BootstrapParams.

Also fix TestRestoreBootstrapParams, which compared protobuf messages with
reflect-based deep equality. That is not sound, as generated types carry
internal state that varies with how the message was built.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan 65b4eb916e vendor: use local api module and update vendored api
Pull in the mount capabilities extension.

The api module is consumed as a published version, so a local replace
is required to build against the unreleased proto changes. The replace
is added by 'make protos' whenever api/next.txtpb changes. It must be
dropped and go.mod pinned to a released api version before this is
merged.

This also moves the root module's own github.com/sirupsen/logrus
requirement from v1.10.1 to v1.10.2, which is not an intended dependency
bump. The published api module (v1.12.0-beta.0) requires logrus v1.9.3,
so it does not affect the root's resolution; the local api/go.mod on
upstream main already requires v1.10.2, and once the replace substitutes
it in, MVS takes the higher of the two. Verified by running 'go mod tidy'
on a copy of this tree with the replace directive removed: the root
stays at v1.10.1. This reverts on its own once the replace above is
dropped.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:49:00 -07:00
Derek McGowan a72247425b api: add shim mount capabilities
A shim that performs some mount types or transformations itself, so that
containerd's mount manager does not perform them on its behalf, had no
way to say so other than a comma separated string in the generic
annotations map of its RuntimeInfo.

Add a containerd.types.MountCapabilities extension a shim can attach to
its BootstrapResult, naming the mount types and transforms it handles.
Detail lives in an extension rather than fields of BootstrapResult so
that containerd can ignore an extension whose type it does not
recognize, letting a shim advertise unconditionally.

Presence of the extension is enough: it is not gated behind a
Capability enum value, since with no other consumer of that field an
enum value here would only ever duplicate what the extension's
presence already says, while still permitting states with no single
correct interpretation, such as the enum value being set with no
extension attached, or the reverse.

This is additive: only a new field is added to BootstrapResult, and
buf breaking is clean.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:47:43 -07:00
Derek McGowan 329998caa9 runtime/v2: remove the runtime-allow-mounts annotation
A shim declared the mount types it performs itself through a comma
separated string in the generic annotations map of its RuntimeInfo,
discovered by invoking the shim binary a second time with -info. The
values had to reproduce by hand the "<transform>/*" sentinel the mount
manager constructs internally, there was nowhere to put anything but a
name, and it was keyed by runtime name rather than shim instance, so it
could not reflect anything about the environment a particular shim is
running in.

Remove it along with loadShimInfo, shimInfo and the shimInfos cache,
and the runc.v2/runhcs.v1 shortcut that only existed to avoid paying
for it on the default runtimes. This is a breaking change targeted at
2.4; known usage is limited to Nerdbox, which can adopt the shim
capability protocol added in the following commits after this merges.

getRuntimeInfo itself stays: it is also used by PluginInfo and
validateRuntimeFeatures.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2026-08-26 10:47:43 -07:00
Fu Wei 24ecaba11d Merge pull request #14041 from thaJeztah/bump_go_metrics
vendor: github.com/docker/go-metrics v0.1.0
2026-08-26 16:03:44 +00:00
Sebastiaan van Stijn 89ba8063e1 vendor: google.golang.org/grpc v1.83.2
contains a fix for [GHSA-2v4p-qf9q-27wj]

full diff: https://github.com/grpc/grpc-go/compare/v1.83.1...v1.83.2

[GHSA-2v4p-qf9q-27wj]: https://github.com/grpc/grpc-go/security/advisories/GHSA-2v4p-qf9q-27wj

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-26 17:44:53 +02:00
Sebastiaan van Stijn ab451b6de8 vendor: tags.cncf.io/container-device-interface 04278701a635
Removes some dependencies, and fixes some concurrency issues.

full diff: https://github.com/cncf-tags/container-device-interface/compare/05ae4b5bb730...04278701a635abbf94c324d4de894c7cce41c2a4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-26 17:34:30 +02:00
Sebastiaan van Stijn b44bea515c vendor: github.com/docker/go-metrics v0.1.0
- Add support for creating timers with custom histogram buckets.
- Update `github.com/prometheus/client_golang` to v1.20.5.
- Update the minimum supported Go version to Go 1.21.
- Improve HTTP handler instrumentation, including minor performance improvements and cleanup.
- Avoid mutating shared label maps when creating namespaces and metrics.
- Encapsulate the Prometheus collector used by `HTTPMetric`.
- Improve package and API documentation.
- Update `golang.org/x/sys` and other dependencies.

full diff: https://github.com/docker/go-metrics/compare/v0.0.1...v0.1.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-26 14:41:03 +02:00
Derek McGowan f414a6fc0c Merge pull request #14037 from thaJeztah/api_bump_logrus
chore(api): update github.com/sirupsen/logrus v1.10.2
2026-08-25 21:10:21 +00:00
Maksym Pavlenko 8efd93896e Merge pull request #14033 from estesp/update-go-1.27
Update CI to include Go 1.27
2026-08-25 20:52:07 +00:00
Maksym Pavlenko 648f046935 Merge pull request #14038 from thaJeztah/bump_go_runc
vendor: github.com/containerd/go-runc v1.2.1
2026-08-25 20:48:36 +00:00
Sebastiaan van Stijn a28910b14f chore(api): update github.com/sirupsen/logrus v1.10.2
update logrus to remove legacy indirect dependencies

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-25 20:43:45 +02:00
Maksym Pavlenko 0b4ed79573 integration: add e2e test to verify trace context propagation
Send a known trace context with the API call and assert that the
environment of the OCI hook runc executes carries it.

The shim propagates the context only when built with the shim_tracing
tag, so build the Linux integration job with it. The integration target
also has to pass the project build tags to the test compile, like the
other build targets already do.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-08-25 11:21:41 -07:00
Maksym Pavlenko 5c25750dd5 shim: propagate trace context to runc and OCI hooks
runc and the OCI hooks it spawns are separate processes, so the trace
context can not reach them over ttrpc. Inject it into their environment
instead, riding on the request context via go-runc's WithExtraEnv, which
does not race with concurrent requests the way setting it on the shim
process would.

The otelttrpc interceptor extracts that context, so chain it first
explicitly instead of leaving it to plugin initialization order. Also
flush the spans the tracing plugin buffered before the shim exits.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-08-25 11:21:41 -07:00
Sebastiaan van Stijn 704ca21342 vendor: github.com/containerd/go-runc v1.2.1
full diff: https://github.com/containerd/go-runc/compare/v1.2.0...v1.2.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-25 20:20:26 +02:00
Maksym Pavlenko beb23bc68d vendor: add go.opentelemetry.io/contrib/propagators/envcar v0.70.0
The carrier implements the OpenTelemetry "Environment Variables as
Context Propagation Carriers" specification, which is how the shim hands
the trace context to the processes it spawns.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-08-25 10:52:02 -07:00
Maksym Pavlenko f63e9b80de Merge pull request #13941 from mxpv/erofs-metrics
erofs: instrument warm up cache
2026-08-25 16:29:01 +00:00
Maksym Pavlenko e26a0fed28 Merge pull request #13991 from mxpv/move-shim-command
Remove shim.Command form pkg
2026-08-25 16:28:51 +00:00
Phil Estes 8d32443320 Update CI to include Go 1.27
Go 1.27 has been released and we can re-enable matrix
building with min and max Go versions as well as move
most of CI jobs to use the latest Go 1.27. Leave install-go
action at 1.26.6.

Signed-off-by: Phil Estes <estesp@amazon.com>
2026-08-25 10:03:38 -04:00