Skip to content

fix: skip rootless reexec for help-only command paths#4994

Open
immanuwell wants to merge 1 commit into
containerd:mainfrom
immanuwell:fix/rootless-help-paths
Open

fix: skip rootless reexec for help-only command paths#4994
immanuwell wants to merge 1 commit into
containerd:mainfrom
immanuwell:fix/rootless-help-paths

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

rootless help paths can die early right now.

nerdctl and parent commands like nerdctl system try to reexec into RootlessKit before showing help. if rootless containerd is not running, users get rootless containerd not running? instead of usage.

This skips that reexec when the command only needs to show subcommands. real runtime commands still keep the old path, so no funny business.

How to repro

  1. On Linux as a non root user, make sure rootless containerd is not running.
  2. Run go build -o /tmp/nerdctl ./cmd/nerdctl
  3. Run /tmp/nerdctl
  4. Run /tmp/nerdctl system

Before, both commands fail with rootless containerd not running?.
After, both print help. system info still follows the old path.

Kinda adjacent to #3185.

Signed-off-by: immanuwell <pchpr.00@list.ru>
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.

2 participants