Skip to content

Deprecations and removals for 2.4 - #14166

Merged
samuelkarp merged 6 commits into
containerd:mainfrom
samuelkarp:deprecations-and-removals-for-2.4
Sep 15, 2026
Merged

samuelkarp merged 6 commits into
containerd:mainfrom
samuelkarp:deprecations-and-removals-for-2.4

Conversation

@samuelkarp

@samuelkarp samuelkarp commented Sep 15, 2026 •

Copy link
Copy Markdown
Member
Remove deprecated CRI and tracing configuration options:
  * Remove `enable_cdi` in CRI runtime configuration (CDI is now always enabled)
  * Remove `bin_dir` in CRI CNI configuration (use `bin_dirs`)
  * Remove `endpoint`, `protocol`, and `insecure` in OTLP tracing processor configuration (use standard OTLP environment variables)
  * Remove `service_name` and `sampling_ratio` in internal tracing configuration (use standard OpenTelemetry environment variables)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Migration cleanup, documentation, and CDI migration test coverage remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Removes deprecated CDI, CNI, and tracing configuration for containerd 2.4.

Changes:

  • Makes CDI configuration unconditional.
  • Replaces legacy tracing settings with OTEL environment variables.
  • Updates migration logic, tests, fixtures, release notes, and documentation.
File summaries
File Summary
RELEASES.md Updates deprecation and removal entries.
plugins/cri/runtime/plugin.go Handles removed CDI settings during migration.
pkg/tracing/plugin/otlp.go Removes legacy tracing configuration.
pkg/tracing/plugin/otlp_test.go Tests OTEL environment configuration.
pkg/deprecation/deprecation.go Removes obsolete warnings.
internal/cri/server/service.go Removes CDI deprecation handling.
internal/cri/server/service_linux.go Enables CDI unconditionally.
internal/cri/server/container_create_linux.go Always applies CDI options.
internal/cri/config/config.go Removes deprecated CRI fields and validation.
internal/cri/config/config_unix.go Removes the CDI default.
internal/cri/config/config_test.go Updates configuration tests.
integration/client/testdata/default-1.7.toml Updates migration fixture.
integration/client/testdata/custom-1.7.toml Updates migration fixture.
docs/cri/crictl.md Removes obsolete CDI output.
docs/cri/config.md Removes deprecated configuration examples.
Review details

Suppressed comments (3)

RELEASES.md:638

  • The removal is incomplete in the user-facing documentation: docs/tracing.md still says that endpoint, protocol, and insecure are supported options, even though this change removes OTLPConfig and no longer decodes those settings. Update that section to document the supported OTEL_* environment variables so users are not directed to options that are now silently ignored.
|`[plugins."io.containerd.tracing.processor.v1.otlp"]`                 | `endpoint`, `protocol`, `insecure` | containerd v1.6.29 | containerd v2.4 ✅    | Use [OTLP environment variables](https://opentelemetry.io/docs/specs/otel/protocol/exporter/), e.g. OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_SDK_DISABLED    |

pkg/tracing/plugin/otlp.go:58

  • With Config removed from this registration, containerd config migrate no longer decodes/rewrites the user-supplied OTLP table: outputConfig skips registrations whose Config is nil, so the old endpoint, protocol, and insecure keys survive the merge and are emitted in the supposedly latest config. Add migration logic to strip these removed keys (or an equivalent cleanup before output) while still keeping the plugin environment-configured at runtime.
		ID:   exporterPlugin,
		Type: plugins.TracingProcessorPlugin,

pkg/tracing/plugin/otlp.go:78

  • The same migration issue applies to the internal tracing table: once this registration has no Config, containerd config migrate leaves user-supplied service_name and sampling_ratio in the output because nil-config registrations are skipped rather than decoded and replaced. Strip these removed keys during migration/output so a migrated config does not advertise options that containerd 2.4 ignores.
		ID:   "tracing",
		Type: plugins.InternalPlugin,
  • Files reviewed: 15/15 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +249 to +251
case "enable_cdi":
// skip (CDI is always enabled)
continue
Copilot AI review requested due to automatic review settings September 15, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Migration cleanup, test coverage, and documentation updates remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (4)

internal/cri/config/config.go:162

  • The removed NetworkPluginBinDir field changes the generated current configuration to bin_dirs, but docs/getting-started.md still tells Windows users to adjust cni bin_dir after running containerd config default. Following that guide will not identify the configured field anymore; update it to refer to bin_dirs.
	NetworkPluginBinDirs []string `toml:"bin_dirs" json:"binDirs"`

pkg/tracing/plugin/otlp.go:58

  • Removing Config here means containerd config migrate will preserve an existing [plugins."io.containerd.tracing.processor.v1.otlp"] table verbatim: outputConfig only decodes registrations with a non-nil Config, so the removed endpoint, protocol, and insecure keys remain in Config.Plugins and are serialized again. Add a migration/cleanup path or retain an empty typed config so these keys are discarded.
		ID:   exporterPlugin,
		Type: plugins.TracingProcessorPlugin,

pkg/tracing/plugin/otlp.go:78

  • The same removal leaves old [plugins."io.containerd.internal.v1.tracing"] settings in Config.Plugins during containerd config migrate, because this registration no longer participates in Config.Decode. Thus service_name and sampling_ratio are emitted back into the migrated file even though they are removed. Add explicit cleanup or an empty config type for this registration.
		ID:   "tracing",
		Type: plugins.InternalPlugin,

plugins/cri/runtime/plugin.go:251

  • This new compatibility branch is not covered by TestCRIRuntimePluginConfigMigration, which exercises the migration function in this file's test package. Add enable_cdi to the source config and assert it is absent from the migrated runtime config; otherwise a later migration change can reintroduce this removed option without detection.
		case "enable_cdi":
			// skip (CDI is always enabled)
			continue
  • Files reviewed: 15/15 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +57 to +58
ID: exporterPlugin,
Type: plugins.TracingProcessorPlugin,
Delay the removal of the auths, configs, and mirrors properties in
[plugins."io.containerd.grpc.v1.cri".registry] until containerd 2.7.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>
Remove the `enable_cdi` configuration option in
`[plugins."io.containerd.cri.v1.runtime"]`, which was deprecated in
v2.2. CDI support is now always enabled.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>
The `bin_dir` property of `[plugins."io.containerd.cri.v1.runtime".cni]`
was deprecated in containerd v2.1 in favor of `bin_dirs` and was
scheduled for removal in v2.4.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>
Remove the deprecated endpoint, protocol, and insecure configuration
options for the io.containerd.tracing.processor.v1.otlp plugin.
These were deprecated in v1.6.29 and replaced by standard OTLP
environment variables.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>
Add unit tests in pkg/tracing/plugin/otlp_test.go to verify newExporter,
checkDisabled, and newTracer with the OpenTelemetry environment
variables that replaced the deprecated OTLP plugin configuration fields.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>
Remove support for service_name and sampling_ratio in the
io.containerd.internal.v1.tracing plugin configuration, which was
previously deprecated in v1.6.29. Users should use standard OTel
environment variables instead (OTEL_SERVICE_NAME, OTEL_TRACES_SAMPLER,
etc.).

Re-add unit tests in pkg/tracing/plugin/otlp_test.go to verify
OTel environment variable configuration for service name, sampling,
exporters, and SDK disabling.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>
Copilot AI review requested due to automatic review settings September 15, 2026 22:08
@samuelkarp
samuelkarp force-pushed the deprecations-and-removals-for-2.4 branch from e88104d to 531b3a3 Compare September 15, 2026 22:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Existing version-3 configs can lose custom CNI paths during migration; migrate cni.bin_dir to cni.bin_dirs and add test coverage.

Review details

Suppressed comments (1)

internal/cri/config/config.go:162

  • Removing NetworkPluginBinDir here drops custom CNI paths from existing version-3 configs that already use [plugins."io.containerd.cri.v1.runtime".cni]: plugins/cri/runtime.configMigration only converts bin_dir when it finds the legacy io.containerd.grpc.v1.cri source, and returns unchanged for a version-3 runtime config. On upgrade to config version 4, that key is therefore ignored and the default /opt/cni/bin is used instead of the configured directory. Migrate a destination cni.bin_dir to cni.bin_dirs before removing the field, and cover that upgrade path with a test.
	// NetworkPluginBinDirs is the directories in which the binaries for the plugin is kept.
	NetworkPluginBinDirs []string `toml:"bin_dirs" json:"binDirs"`
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@samuelkarp
samuelkarp marked this pull request as ready for review September 15, 2026 22:15
@samuelkarp samuelkarp added this to the 2.4 milestone Sep 15, 2026
@samuelkarp samuelkarp moved this from Needs Triage to Needs Reviewers in Pull Request Review Sep 15, 2026
@github-project-automation github-project-automation Bot moved this from Needs Reviewers to Review In Progress in Pull Request Review Sep 15, 2026
@samuelkarp
samuelkarp added this pull request to the merge queue Sep 15, 2026
Merged via the queue into containerd:main with commit 610d8d8 Sep 15, 2026
55 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Sep 15, 2026
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
containerd 2.4.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>Welcome to the v2.4.0 release of containerd!

containerd 2.4 is a regular (non-LTS) release with a shorter support window,
intended for users who want to adopt new features sooner. As the release
following the 2.3 LTS, it is the point in the release cycle where previously
deprecated features may be removed, so this release may include breaking
changes; check the notes below and clear any deprecation warnings from your
current version before upgrading.

Users prioritizing stability and a longer support lifecycle should stay on the
2.3 LTS release.

### Highlights

#### Container Runtime Interface (CRI)

* Enable mount manager for image mounts in CRI ([#13542](containerd/containerd#13542))
* Export sandbox image and CNI directory configuration in CRI plugin info ([#13940](containerd/containerd#13940))
* Set default runtimeFeatures.UserNamespacesHostNetwork to true ([#13162](containerd/containerd#13162))
* Support OCI runtime feature introspection for non-runc runtimes ([#13504](containerd/containerd#13504))

#### Image Distribution

* Apply hardening to strip sensitive authentication headers when fetching descriptor URLs ([#12889](containerd/containerd#12889))
* Support propagating HTTP 299 warning headers from registries to the resolver ([#12698](containerd/containerd#12698))
* Use klauspost/compress for gzip layer decompression ([#13560](containerd/containerd#13560))

#### Image Storage

* Add client options to fetch all layer content during unpack even when snapshots exist ([#14126](containerd/containerd#14126))
* Include media type in content create events ([#13833](containerd/containerd#13833))
* Add forward References to the GC collection context ([#13634](containerd/containerd#13634))

#### Node Resource Interface (NRI)

* Expose container image name, digest, and config digest to NRI plugins ([#13960](containerd/containerd#13960))
* Emit deprecation warnings for plugins using deprecated NRI interfaces ([#13916](containerd/containerd#13916))

#### Runtime

* Mask /proc/interrupts and CPU thermal throttle sysfs paths in Linux containers by default ([#14090](containerd/containerd#14090))
* Add UpdateSandbox RPC to propagate sandbox controller updates to the shim ([#14105](containerd/containerd#14105))
* Avoid immediately restarting containers with restart=always policy after they are explicitly stopped ([#13993](containerd/containerd#13993))
* Pass tracing context from shim to runc and hooks ([#14036](containerd/containerd#14036))
* Fix user and group lookup failures in container rootfs containing symlinked /etc/passwd or /etc/group ([#13818](containerd/containerd#13818))
* Implement Windows named-pipe server and log streaming support in pkg/shim ([#13948](containerd/containerd#13948))
* Enable log scrubbing by default on Windows ([#13837](containerd/containerd#13837))
* Allow specifying parent checkpoint directory when checkpointing with runc ([#13699](containerd/containerd#13699))

#### Snapshotters

* Add Prometheus metrics for EROFS snapshotter layer content cache ([#13941](containerd/containerd#13941))
* Support warm image cache for erofs snapshotter ([#13813](containerd/containerd#13813))
* Add max size label for snapshots ([#13520](containerd/containerd#13520))

#### Breaking

* Remove deprecated CRI and tracing configuration options:
  * Remove `enable_cdi` in CRI runtime configuration (CDI is now always enabled)
  * Remove `bin_dir` in CRI CNI configuration (use `bin_dirs`)
  * Remove `endpoint`, `protocol`, and `insecure` in OTLP tracing processor configuration (use standard OTLP environment variables)
  * Remove `service_name` and `sampling_ratio` in internal tracing configuration (use standard OpenTelemetry environment variables) ([#14166](containerd/containerd#14166))
* Remove restore in CreateContainer ([#13871](containerd/containerd#13871))

#### Deprecations

* Deprecate containerd.io/runtime-allow-mounts shim annotation in favor of MountCapabilities bootstrap extension ([#14002](containerd/containerd#14002))
* Remove deprecated shim.Command from pkg ([#13991](containerd/containerd#13991))
* Deprecate task API address and version fields in runc options and move to CreateTaskRequest ([#13360](containerd/containerd#13360))

Please try out the release binaries and report any issues at
https://github.com/containerd/containerd/issues.

### Contributors

* Maksym Pavlenko
* Sebastiaan van Stijn
* Samuel Karp
* Derek McGowan
* Wei Fu
* Akihiro Suda
* Mike Brown
* Paweł Gronowski
* Chris Henzie
* Phil Estes
* Brian Goff
* Austin Vazquez
* ningmingxiao
* Jordan Liggitt
* Akhil Mohan
* Eshaan Mathur
* Krisztian Litkey
* Chris Ayoub
* Kazuyoshi Kato
* Kir Kolyshkin
* Sergey Kanzhelev
* Ahmet Alp Balkan
* Arpit Jain
* Cindy Li
* Damien Grisonnet
* Esteban Ginez
* Gao Xiang
* Harsh Rawat
* Laura Lorenz
* Maksim An
* Oleh Konko
* Philip Laine
* Abhishek Bhunia
* Alan Grosskurth
* Albin Kerouanton
* Alex Lyn
* Aman Raj
* Amir Alavi
* Amit Barve
* Andrew Halaney
* AprilNEA
* Arjun Yogidas
* Ayato Tokubi
* Aysha Afrah Ziya
* Ben Cressey
* Bing Hongtao
* Chris Crone
* Craig Gumbley
* Daniel De Graaf
* Davanum Srinivas
* Dr. Jan-Philip Gehrcke
* Harshal Patel
* Henry Wang
* Hsiu-Chi Tsai
* JP Phillips
* Jing Chen
* Kohei Tokunaga
* LEI WANG
* Martín Fernández
* Mikhail Dmitrichenko
* Nahum Litvin
* Nikolaus Schuetz
* Pablo Garcia Caceres
* Paco Xu
* Robert Cronin
* SaloniRathi
* Shambhavi Srivastava
* Tianon Gravi
* XlabAI
* Yuanliang Zhang
* ayush-panta
* crawfordxx
* cshung
* match man
* s3onghyun
* 归寂
* 徐晓伟

### Changes
<details><summary>658 commits</summary>
<p>

  * [`647fafa847`](containerd/containerd@647fafa) Prepare release notes for v2.4.0
* Prepare release notes for api/v1.12.0 ([#14170](containerd/containerd#14170))
  * [`5c4ea21de3`](containerd/containerd@5c4ea21) Prepare release notes for api/v1.12.0
* Deprecations and removals for 2.4 ([#14166](containerd/containerd#14166))
  * [`531b3a37b9`](containerd/containerd@531b3a3) tracing: remove deprecated tracing config options
  * [`ca8579a334`](containerd/containerd@ca8579a) tracing: add tests for otlp exporter and env vars
  * [`ee024b7c99`](containerd/containerd@ee024b7) tracing: remove deprecated otlp configs
  * [`f7c654fb4f`](containerd/containerd@f7c654f) cri: remove deprecated cni bin_dir
  * [`4f7de25abb`](containerd/containerd@4f7de25) cri: remove enable_cdi config option
  * [`830b48d3fd`](containerd/containerd@830b48d) cri: delay registry config removal to 2.7
* Prepare release notes for v2.4.0-rc.0 ([#14115](containerd/containerd#14115))
  * [`c02620e398`](containerd/containerd@c02620e) Prepare release notes for v2.4.0-rc.0
  * [`02c7c97f43`](containerd/containerd@02c7c97) Update release doc for 2.4.0 release
  * [`484e5aba58`](containerd/containerd@484e5ab) vendor: github.com/containerd/containerd/api v1.12.0-rc.1
  * [`67174d675c`](containerd/containerd@67174d6) mailmap: add Paweł Gronowski
* Update erofs snapshotter to record blob source ([#14107](containerd/containerd#14107))
  * [`697a7571a4`](containerd/containerd@697a757) erofs: give a dm-verity device a name unique to its mount
  * [`f75817eb3b`](containerd/containerd@f75817e) erofs: record where a layer blob is
  * [`d92088d822`](containerd/containerd@d92088d) erofs: refuse to apply into a read-only snapshot
  * [`8cc0b076a6`](containerd/containerd@8cc0b07) erofs: serve layer content cache on parented Prepare
* build(deps): bump the golang-x group with 4 updates ([#14150](containerd/containerd#14150))
  * [`75138b3fda`](containerd/containerd@75138b3) build(deps): bump the golang-x group with 4 updates
* build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.0 ([#14153](containerd/containerd#14153))
  * [`353342cae6`](containerd/containerd@353342c) build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.0
* pkg/oci: mask thermal interrupt info ([#14090](containerd/containerd#14090))
  * [`c176f185b0`](containerd/containerd@c176f185b08e14bde055d81dc509

See merge request: Harmonybrew/homebrew-core!20372
farshadasadpour added a commit to farshadasadpour/kubespray that referenced this pull request Oct 22, 2026
containerd 2.4 removed the enable_cdi CRI runtime config option
(containerd/containerd#14166): CDI is now always enabled. Writing it
makes 2.4.2 log

  level=warning msg="Ignoring unknown key in TOML for plugin" ... key=enable_cdi

Emit enable_cdi only for containerd < 2.4.0. cdi_spec_dirs remains
valid and is still written. Rendering with containerd_version 2.3.7 is
byte-identical to before this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants