Skip to content

restore: Accept no-subreaper option from containerd - #2397

Closed
sairex53 wants to merge 1 commit into
containers:mainfrom
sairex53:fix-2396-restore-no-subreaper
Closed

sairex53 wants to merge 1 commit into
containers:mainfrom
sairex53:fix-2396-restore-no-subreaper

Conversation

@sairex53

Copy link
Copy Markdown

Summary

containerd passes -no-subreaper to crun restore during CRIU restore. The command currently rejects the option and exits before restore can start.

Accept both the standard --no-subreaper spelling and the single-dash spelling sent by containerd. The option remains a no-op, consistent with crun's create and run commands. Add a CLI regression test for both spellings.

Fixes #2396.

Testing

  • Built on Fedora 44 aarch64 with --disable-systemd --enable-werror.
  • make clang-format and git diff --check passed.
  • Verified both spellings reach the expected missing-container-ID check in a temporary command-enabled build.
  • The registered CLI test skips locally because this VM has no CRIU support; CI's CRIU-enabled job can run it.

Accept the compatibility flag passed by containerd during CRIU
restore. crun does not use a subreaper on this path, so the option
has no effect, like it does for create and run.

Also normalize the single-dash spelling in containerd's argv.
Add a CLI regression test for both spellings.

Closes: containers#2396
Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>
Agent: Codex
Comment thread src/restore.c
Comment on lines +181 to +183
for (int i = 1; i < argc; i++)
if (strcmp (argv[i], "-no-subreaper") == 0)
argv[i] = "--no-subreaper";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it looks like a typo, better to fix it in containerd

@kolyshkin

Copy link
Copy Markdown
Collaborator

it looks like a typo, better to fix it in containerd

@kolyshkin kolyshkin closed this Oct 21, 2026
@giuseppe

Copy link
Copy Markdown
Member

it looks like a typo, better to fix it in containerd

I think we still need to treat --no-subreaper like a NO-OP though

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.

crun restore rejects containerd's -no-subreaper, so a crun-backed containerd container can never be restored from a CRIU checkpoint

3 participants