Skip to content

fix: allow updating restart policy before startup - #5376

Open
immanuwell wants to merge 1 commit into
containerd:mainfrom
immanuwell:fix/update-restart-before-start
Open

immanuwell wants to merge 1 commit into
containerd:mainfrom
immanuwell:fix/update-restart-before-start

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

update --restart fails with no running task found after create. Save the policy when there is no task, leaving restart monitoring off until start.

Repro:

nerdctl create --net=none --name restart-repro busybox:1.36 sleep 600
nerdctl update --restart=always restart-repro

Tested with containerd 2.2.5 and Docker 29.6.1. Regression tests and make lint-go-all pass.

Containers created but not started have no task. Save the restart policy
without setting a desired status until start creates the task.

Signed-off-by: Immanuel Tikhonov <pchpr.00@list.ru>
@immanuwell
immanuwell force-pushed the fix/update-restart-before-start branch from 484e0f6 to cea65ad Compare November 27, 2026 18:21
@AkihiroSuda AkihiroSuda added this to the v2.5.0 milestone Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants