Skip to content

fix(dfinit): support images CRI plugin in containerd v2 configs - #2004

Merged
gaius-qi merged 2 commits into
dragonflyoss:mainfrom
544129603:codex/fix-aks-containerd-v2-images-plugin
Aug 25, 2026
Merged

fix(dfinit): support images CRI plugin in containerd v2 configs#2004
gaius-qi merged 2 commits into
dragonflyoss:mainfrom
544129603:codex/fix-aks-containerd-v2-images-plugin

Conversation

@544129603

Copy link
Copy Markdown
Contributor

Description

Select the containerd CRI plugin from the plugin tables present in config.toml, while keeping the version-specific plugin as the preferred choice.

This allows AKS containerd 2 configurations that expose io.containerd.cri.v1.images instead of io.containerd.grpc.v1.cri to use registry config_path mode.

A regression test covers a version 2 configuration containing only the images CRI plugin.

Related Issue

Fixes #1993

Motivation and Context

Some managed containerd 2 deployments use the newer images CRI plugin table even though the top-level config version is still 2. Selecting only by version makes dfinit look for a plugin table that does not exist and fail before writing registry configuration.

Screenshots (if appropriate)

N/A

@544129603
544129603 force-pushed the codex/fix-aks-containerd-v2-images-plugin branch from 5633438 to d2eb65f Compare August 24, 2026 07:48
Signed-off-by: Startalker <438747480@qq.com>
@544129603
544129603 force-pushed the codex/fix-aks-containerd-v2-images-plugin branch from d2eb65f to 8267c00 Compare August 24, 2026 07:52
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.18%. Comparing base (ff17c0b) to head (5251d81).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2004      +/-   ##
==========================================
+ Coverage   53.59%   54.18%   +0.59%     
==========================================
  Files         100      101       +1     
  Lines       26908    27237     +329     
==========================================
+ Hits        14420    14759     +339     
+ Misses      12488    12478      -10     
Files with missing lines Coverage Δ
dragonfly-client-config/src/dfinit.rs 91.38% <100.00%> (+0.13%) ⬆️
...ly-client-init/src/container_runtime/containerd.rs 97.31% <100.00%> (+1.39%) ⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@544129603

Copy link
Copy Markdown
Contributor Author

All code checks now pass. The remaining Classify PR check requires one impact label. Issue #1993 is labeled enhancement, but I do not have permission to add labels to this repository; please add the enhancement label during triage.

@544129603
544129603 marked this pull request as ready for review August 24, 2026 09:27
@544129603
544129603 requested review from a team as code owners August 24, 2026 09:27
@github-actions
github-actions Bot requested review from fcgxz2003 and yxxhero August 24, 2026 09:27
@gaius-qi gaius-qi added the enhancement New feature or request label Aug 25, 2026
@gaius-qi gaius-qi added this to the v2.6.0 milestone Aug 25, 2026
…lugin selection

Allow users to explicitly specify which CRI plugin ID owns the registry
configuration (e.g. `io.containerd.cri.v1.images`) instead of relying
on automatic detection. This is useful for environments like AKS that
ship version 2 configs with the containerd 2.x images plugin. The
auto-detection logic is refactored into `get_cri_plugin_id` and now
iterates candidates in version-preferred order, falling back to the
other plugin if only it is present in the config.

Signed-off-by: Gaius <gaius.qi@gmail.com>

@gaius-qi gaius-qi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@gaius-qi
gaius-qi merged commit b78b2be into dragonflyoss:main Aug 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support azure aks io.containerd.cri.v1.images in containerd version: 2

4 participants