Skip to content

sysext/containerd: read drop-ins from /etc/containerd/conf.d - #4150

Open
satwiksps wants to merge 1 commit into
flatcar:mainfrom
satwiksps:containerd-dropin-config
Open

satwiksps wants to merge 1 commit into
flatcar:mainfrom
satwiksps:containerd-dropin-config

Conversation

@satwiksps

@satwiksps satwiksps commented Jul 24, 2026 •

Copy link
Copy Markdown

Changing containerd settings currently requires copying the shipped config, which can miss later updates. This adds /etc/containerd/conf.d/*.toml imports to both configs so users can keep their settings in separate files.

Both configs now use version 3 to support v2 and v3 drop-ins. This also removes obsolete settings, updates the CRI plugin names, and drops the redundant gRPC section.

How to use

Create /etc/containerd/conf.d/50-log.toml, then restart containerd:

version = 3
[plugins."io.containerd.cri.v1.runtime"]
max_container_log_line_size = 65536

Testing done

Tested both configs with containerd 2.3.5 in isolated WSL mount namespaces. Local validation scripts reported:

python3 flatcar-pr4150-validation.py
PASS: 36 configuration checks with the packaged containerd 2.3.5

python3 flatcar-pr4150-daemon-review.py
PASS: 12 daemon startup/recovery scenarios with containerd 2.3.5

Covered v2/v3 imports, ordering, preserved defaults, missing/empty directories, invalid config and recovery. git diff --check passed with no output.

The updated configs have not been tested in a Flatcar VM.

  • Changelog entry added.
  • Inspected CI output for image differences.

AI assisted with code changes and local tests under my supervision.

@satwiksps
satwiksps requested a review from a team as a code owner July 24, 2026 18:19
@satwiksps
satwiksps force-pushed the containerd-dropin-config branch from 1e044ba to a5b3566 Compare August 6, 2026 01:27
@satwiksps satwiksps changed the title sysext/containerd: define drop-in config directory sysext/containerd: read drop-ins from /etc/containerd/conf.d Aug 6, 2026
@satwiksps satwiksps closed this by deleting the head repository Aug 26, 2026
@satwiksps satwiksps reopened this Sep 13, 2026
@satwiksps
satwiksps force-pushed the containerd-dropin-config branch from a5b3566 to a2b71f9 Compare September 13, 2026 13:42

@tormath1 tormath1 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.

Thanks for this PR and sorry for the delay here. :) It looks good, let's take this opportunity to upgrade containerd config. To avoid warnings like that:

Oct 09 07:33:33 localhost containerd[1437]: time="2026-10-09T07:33:33Z" level=warning msg="Ignoring unknown key in TOML" column=1 error="strict mode: fields in the document are missing in the target struct" file=/usr/share/containerd/flatcar-config.toml key=subreaper row=3

@@ -1,5 +1,8 @@
version = 2

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.

While here, can we bump the version 2 to version 3 ? Like so folks can drop containerd configuration to version 2 or 3. It's not possible to do the other way (i.e drop-in version 3 with a base configuration using version 2).

This might:

  • drop subreaper
  • drop the [plugins."io.containerd.runtime.v1.linux"] plugin
  • rename the io.containerd.grpc.v1.cri plugin
  • we can drop the grpc section as well, it's the same as the default config

@@ -1,5 +1,8 @@
version = 2

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.

Same as above.

Custom containerd settings currently require a copy of the shipped
configuration, which misses later changes to its defaults.

Import /etc/containerd/conf.d/*.toml from both shipped configurations
and use version 3 so local settings can use version 2 or 3 drop-ins.
Move CRI settings to the runtime plugin and remove obsolete settings
and redundant gRPC defaults.

Signed-off-by: Satwik Sai Prakash Sahoo <sahoospsatwik@gmail.com>
@satwiksps
satwiksps force-pushed the containerd-dropin-config branch from a2b71f9 to 554d8d1 Compare October 11, 2026 17:29
@satwiksps
satwiksps requested a review from tormath1 October 11, 2026 17:51

This branch was previously deployed

1 inactive (outdated) deployment
development — 1e044ba6 Deployed Jul 29, 2026 by satwiksps via Wait for approval #5671
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Testing / in Review

Development

Successfully merging this pull request may close these issues.

[RFE] Define containerd drop-in config directory

3 participants