Skip to content

[containerd-config-toml] set default runtime_type value if not present - #1969

Merged
tariq1890 merged 1 commit into
mainfrom
set-default-runtime-type
Aug 4, 2026
Merged

[containerd-config-toml] set default runtime_type value if not present#1969
tariq1890 merged 1 commit into
mainfrom
set-default-runtime-type

Conversation

@tariq1890

@tariq1890 tariq1890 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #1956

This PR addresses a scenario where valid albeit incomplete containerd config tomls may be provided as a base config. In this case, the runtime_type field was missing in the base config TOML, so the drop-in config TOML which defines the custom runtimes did not have the runtime_type populated. This led to errors starting up containers which used these custom runtimes.

error="rpc error: code = InvalidArgument desc = failed to start sandbox \"96ca033f576080a5cbf8365e57fad83184c690fd17ea9ffc3fa3c4bf8c6b220e\": failed to create containerd container: create container failed validation: container.Runtime.Name must be set: invalid argument"

This PR changes that by automatically populating the runtime_type field with the default value in the new runtime handler blocks should the runtime_type be empty

@coveralls

coveralls commented Aug 4, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 30931930163

Coverage increased (+0.01%) to 43.626%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: 3 of 3 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 15266
Covered Lines: 6660
Line Coverage: 43.63%
Coverage Strength: 0.49 hits per line

💛 - Coveralls

Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com>
@tariq1890
tariq1890 force-pushed the set-default-runtime-type branch from 155f1a5 to fcc99fd Compare August 4, 2026 17:01
Comment thread pkg/config/engine/containerd/config.go
@tariq1890 tariq1890 added this to the v1.20.0 milestone Aug 4, 2026
@tariq1890 tariq1890 self-assigned this Aug 4, 2026
@tariq1890
tariq1890 merged commit f861483 into main Aug 4, 2026
44 of 46 checks passed
@tariq1890
tariq1890 deleted the set-default-runtime-type branch August 4, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: containerd drop-in compatible with version 3 is missing the runtime_type field

4 participants