Skip to content

oci: use path.Join to fill CgroupsPath - #13661

Merged
dmcgowan merged 1 commit into
containerd:mainfrom
akerouanton:default-unix-spec
Jun 25, 2026
Merged

dmcgowan merged 1 commit into
containerd:mainfrom
akerouanton:default-unix-spec

Conversation

@akerouanton

Copy link
Copy Markdown
Member

populateDefaultUnixSpec uses filepath.Join to generate the default CgroupsPath. On Windows, this produces invalid paths as path elems are joined with backslash. Switch to path.Join instead.

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

This PR fixes Linux OCI spec generation on Windows (LCOW scenario) by ensuring the default Linux.CgroupsPath is built using forward-slash semantics, avoiding invalid backslash-separated paths produced by filepath.Join on Windows.

Changes:

  • Replace filepath.Join with path.Join when generating the default Linux.CgroupsPath in populateDefaultUnixSpec.
  • Update imports accordingly.

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

Comment thread pkg/oci/spec.go Resolved
`populateDefaultUnixSpec` uses `filepath.Join` to generate the default
`CgroupsPath`. On Windows, this produces invalid paths as path elems are
joined with backslash. Switch to `path.Join` instead.

Signed-off-by: Albin Kerouanton <[email protected]>
@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Jun 25, 2026
@dmcgowan
dmcgowan added this pull request to the merge queue Jun 25, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Jun 25, 2026
Merged via the queue into containerd:main with commit 53f4271 Jun 25, 2026
50 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Jun 25, 2026
@akerouanton
akerouanton deleted the default-unix-spec branch June 29, 2026 08:46
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.

4 participants