Skip to content

Conversation

@dmcgowan
Copy link
Member

Prevents socket paths becoming too long when the resolved current working directory differs from the given bundle path, for example current working directory resolving to /private/var/... but the bundle directory reported as /var/.... The vm state directory does not need to be associated with a specific bundle and the working directory assigned to the shim is sufficient as the parent for the vm state directory.

Copilot AI review requested due to automatic review settings January 28, 2026 22:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the vm state directory from being bundle-relative to current-working-directory-relative to prevent socket path length issues on macOS where path resolution can differ (e.g., /var vs /private/var).

Changes:

  • Modified vm state directory creation to use filepath.Abs("vm") instead of filepath.Join(r.Bundle, "vm")
  • Added error handling for the absolute path resolution
  • Added a comment explaining the rationale for the change

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

Prevents socket paths becoming too long when the resolved current working
directory differs from the given bundle path, for example current
working directory resolving to `/private/var/...` but the bundle directory
reported as `/var/...`. The vm state directory does not need to be
associated with a specific bundle and the working directory assigned to
the shim is sufficient as the parent for the vm state directory.

Signed-off-by: Derek McGowan <derek@mcg.dev>
@dmcgowan dmcgowan merged commit 68fa0db into containerd:main Feb 3, 2026
3 checks passed
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