Skip to content

ctr: register EROFS fsview - #13891

Merged
fuweid merged 1 commit into
containerd:mainfrom
cayoub-oai:ctr-erofs-fsview
Aug 2, 2026
Merged

fuweid merged 1 commit into
containerd:mainfrom
cayoub-oai:ctr-erofs-fsview

Conversation

@cayoub-oai

Copy link
Copy Markdown
Contributor

Summary

ctr resolves named users and groups for run --user and
tasks exec --user in the client process. Although pkg/oci can inspect
EROFS snapshots directly through fsview, the ctr application does not
currently register the EROFS handler and falls back to a temporary host
mount.

Register the EROFS fsview handler with the ctr application. For non-EROFS
mounts, fsview skips this handler and continues through the existing built-in
handlers and mount fallback paths.

Testing

  • Ran go test ./cmd/ctr/app ./cmd/gen-manpages ./internal/fsview. This
    compiles the affected ctr application and manpage generator and runs the
    existing fsview test suite.
  • Started a container using the EROFS snapshotter and
    io.containerd.kata.v2.
  • Ran ctr tasks exec --user nobody ... id with baseline and patched ctr
    binaries. Both resolved nobody to UID and GID 65534.
  • Traced ctr using strace -f -e mount,umount2. The baseline binary mounted
    and unmounted a temporary /tmp/containerd-mount* path, while the patched
    binary issued no mount or umount2 calls.
  • Host mount and loop-device counts remained unchanged after the patched
    execution.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Registers the EROFS fsview handler in the ctr client so client-side OCI user/group resolution (e.g., ctr run --user, ctr tasks exec --user) can inspect EROFS snapshots directly via fsview instead of falling back to temporary host mounts.

Changes:

  • Add a blank import in ctr to register the EROFS fsview handler at startup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ctr resolves named users and groups for run and task exec in the
client process. Since EROFS fsview support moved behind registration,
the ctr application does not link the handler and falls back to a
temporary host mount.

Register the handler with the ctr application so EROFS snapshots can
be inspected directly. Non-EROFS mounts continue through the existing
handlers unchanged.

Signed-off-by: Chris Ayoub <[email protected]>
Copilot AI review requested due to automatic review settings August 1, 2026 22:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Aug 2, 2026
@hsiangkao
hsiangkao requested review from dmcgowan, fuweid and mxpv August 2, 2026 06:56
@fuweid
fuweid added this pull request to the merge queue Aug 2, 2026
Merged via the queue into containerd:main with commit d46562d Aug 2, 2026
88 of 90 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Aug 2, 2026
@cayoub-oai
cayoub-oai deleted the ctr-erofs-fsview branch August 3, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants