containerd,nerdctl: preserve config files + add init script#29487
containerd,nerdctl: preserve config files + add init script#29487dzavy wants to merge 2 commits into
Conversation
| $(INSTALL_DIR) $(1)/etc/init.d | ||
| $(INSTALL_BIN) ./files/containerd.init $(1)/etc/init.d/containerd |
There was a problem hiding this comment.
Could you please separate adding init file to its own commit, pleaase? It would be better for cherry-picking.
There was a problem hiding this comment.
Both changes require bumping PKG_RELEASE so not sure how to achieve that cleanly?
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Preserves user configuration files during sysupgrade for both containerd and nerdctl packages, and adds a procd init script for containerd.
Changes:
- Add
conffilesdefinition to containerd and nerdctl Makefiles to preserve config files - Add a new procd init script for containerd
- Bump
PKG_RELEASEfor both packages
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| utils/nerdctl/Makefile | Bumps PKG_RELEASE and declares /etc/nerdctl/nerdctl.toml as conffile |
| utils/containerd/Makefile | Bumps PKG_RELEASE, declares config.toml as conffile, installs new init script |
| utils/containerd/files/containerd.init | New procd init script for containerd |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| define Package/containerd/install | ||
| $(INSTALL_DIR) $(1)/usr/bin/ | ||
| $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/{ctr,containerd,containerd-stress,containerd-shim-runc-v2} $(1)/usr/bin/ |
| start_service() { | ||
| procd_open_instance | ||
| procd_set_param respawn | ||
| procd_set_param command $CONTAINERD_BIN |
| define Package/nerdctl/conffiles | ||
| /etc/nerdctl/nerdctl.toml | ||
| endef | ||
|
|
There was a problem hiding this comment.
Yes this is intentional. nerdctl.toml is not required, nerdctl would use defaults, however if it's overriden by user (especially to set data_root to persistent storage) it should be preserved during sysupgrade.
also add init script Signed-off-by: Jan Havelka <dzavy@dzavy.net>
preserve config file during sysupgrade Signed-off-by: Jan Havelka <dzavy@dzavy.net>
ecc207e to
a1ae588
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 2 new commits; both commit messages match their changes. One inline suggestion on the new containerd init script; the config-default and commit-split points were already covered by earlier reviewers.
Generated by Claude Code
| start_service() { | ||
| procd_open_instance | ||
| procd_set_param respawn | ||
| procd_set_param command $CONTAINERD_BIN | ||
| procd_close_instance |
There was a problem hiding this comment.
The service is started without raising the open-file limit. containerd, like the runtime it powers, keeps many file descriptors open (sockets, container fds, shim connections) and the kernel default (often 1024) is easily exhausted. The sibling dockerd.init in this repo sets procd_set_param limits nofile=... for exactly this reason; the standalone containerd instance should do the same.
| start_service() { | |
| procd_open_instance | |
| procd_set_param respawn | |
| procd_set_param command $CONTAINERD_BIN | |
| procd_close_instance | |
| start_service() { | |
| local nofile=$(cat /proc/sys/fs/nr_open) | |
| procd_open_instance | |
| procd_set_param respawn | |
| procd_set_param command $CONTAINERD_BIN | |
| procd_set_param limits nofile="${nofile} ${nofile}" | |
| procd_close_instance |
Generated by Claude Code
📦 Package Details
Maintainer: @lu-zero
Description:
Preserve config files during sysupgrade + add init script for containerd
🧪 Run Testing Details
✅ Formalities