Skip to content

Containerd 2.2: support setting max-concurrent-unpacks#886

Merged
ytsssun merged 2 commits intobottlerocket-os:developfrom
ytsssun:containerd-22/max-concurrent-unpacks
Apr 17, 2026
Merged

Containerd 2.2: support setting max-concurrent-unpacks#886
ytsssun merged 2 commits intobottlerocket-os:developfrom
ytsssun:containerd-22/max-concurrent-unpacks

Conversation

@ytsssun
Copy link
Copy Markdown
Contributor

@ytsssun ytsssun commented Mar 30, 2026

Issue number:

Related: #806

Description of changes:

Expose containerd 2.2's max_concurrent_unpacks transfer service setting via settings.container-runtime.max-concurrent-unpacks, and add warning infrastructure for variants using older containerd versions.

Containerd 2.2 templates:

  • Added {{#if settings.container-runtime.max-concurrent-unpacks}} block to containerd-config-toml_k8s_containerd_sock and containerd-config-toml_k8s_nvidia_containerd_sock, rendering max_concurrent_unpacks under [plugins."io.containerd.transfer.v1.local"]

Unsupported setting warning (containerd 1.7 and 2.1):

  • New unsupported-setting-warning@.service and unsupported-setting-warning@.timer systemd template units in the release package (same pattern as deprecation-warning@)
  • Warning template max-concurrent-unpacks-unsupported added to containerd-1.7 and containerd-2.1 packages — writes an env file to /etc/unsupported-settings/ when the setting is configured
  • Timer fires on startup and every 6 hours, logging: The setting "container-runtime.max-concurrent-unpacks" is not supported by the containerd version in this variant and has no effect.

Depends on bottlerocket-os/bottlerocket-settings-sdk#119 for the settings model.

Testing done:

Built aws-k8s-1.35 variant with both containerd 2.2 and containerd 2.1, using the setting introduced in bottlerocket-os/bottlerocket-settings-sdk#119. Launched EC2 instances with settings.container-runtime.max-concurrent-unpacks = 5 in user data.

Containerd 2.2:

  • /etc/containerd/config.toml renders max_concurrent_unpacks = 5 under [plugins."io.containerd.transfer.v1.local"]
  • No warning in journal ✅

Containerd 2.1:

  • max_concurrent_unpacks not rendered in containerd config ✅
  • Timer active, journal warning: The setting container-runtime.max-concurrent-unpacks is not supported by the containerd version in this variant and has no effect.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@ytsssun ytsssun requested a review from arnaldo2792 March 30, 2026 23:25
@ytsssun
Copy link
Copy Markdown
Contributor Author

ytsssun commented Mar 30, 2026

Putting to draft as the depending bottlerocket-os/bottlerocket-settings-sdk#119 is not yet merged.

@ytsssun ytsssun changed the title Containerd 22/max concurrent unpacks Containerd 2.2: support setting max-concurrent-unpacks Apr 2, 2026
@ytsssun ytsssun force-pushed the containerd-22/max-concurrent-unpacks branch 3 times, most recently from 01a226f to 16df481 Compare April 8, 2026 21:21
@ytsssun ytsssun marked this pull request as ready for review April 9, 2026 21:18
@vigh-m
Copy link
Copy Markdown
Contributor

vigh-m commented Apr 15, 2026

I'm wondering if there is a way to piggyback on what already exists for deprecation-warning@ instead of creating new timers and services.
We can potentially put the unsupported-setting@.service in the same path as the deprecation-warning and reuse the time?

@ytsssun
Copy link
Copy Markdown
Contributor Author

ytsssun commented Apr 15, 2026

I'm wondering if there is a way to piggyback on what already exists for deprecation-warning@ instead of creating new timers and services. We can potentially put the unsupported-setting@.service in the same path as the deprecation-warning and reuse the time?

Yeah, the implementation is basically mimicking what we did for deprecation-warning, but you can probably tell that semantically, it has different meaning here - the setting max-concurrent-unpacks is not a deprecated setting, instead it is a new setting that the older containerd versions does not support.

And due to the difference in the semantic of these two, the warning message will be different, in which case a separate service makes sense to me. We can arguably reuse the timer, but unsupported-setting-warning@.timer seems more consistent here?

@vigh-m
Copy link
Copy Markdown
Contributor

vigh-m commented Apr 15, 2026

That's fair. The consistency of naming over code reuse is an acceptable tradeoff. :)

Comment thread packages/release/unsupported-setting-warning@.service Outdated
Comment thread packages/containerd-2.2/containerd-config-toml_k8s_containerd_sock
@piyush-jena
Copy link
Copy Markdown
Contributor

The commits are a bit messed up on this one. The settings-sdk bump has schnauzer fixes as well. You may rebase not as my PR with the settings-sdk is merged.

@ytsssun ytsssun force-pushed the containerd-22/max-concurrent-unpacks branch from 16df481 to 25d42e8 Compare April 16, 2026 21:33
ytsssun added 2 commits April 16, 2026 21:39
Signed-off-by: Yutong Sun <yutongsu@amazon.com>
Signed-off-by: Yutong Sun <yutongsu@amazon.com>
@ytsssun ytsssun force-pushed the containerd-22/max-concurrent-unpacks branch from 25d42e8 to 12563ae Compare April 16, 2026 21:42
@ytsssun
Copy link
Copy Markdown
Contributor Author

ytsssun commented Apr 16, 2026

The commits are a bit messed up on this one. The settings-sdk bump has schnauzer fixes as well. You may rebase not as my PR with the settings-sdk is merged.

Yes, just dropped the commit in my PR for the settings sdk bump.

@ytsssun
Copy link
Copy Markdown
Contributor Author

ytsssun commented Apr 16, 2026

Force pushed drop the commits to bump settings sdk as that is merged along with #901.

Also addressed comments per @arnaldo2792

Copy link
Copy Markdown
Contributor

@piyush-jena piyush-jena left a comment

Choose a reason for hiding this comment

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

nice

@ytsssun ytsssun merged commit 6c6b05a into bottlerocket-os:develop Apr 17, 2026
3 of 4 checks passed
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.

4 participants