Skip to content

bump runc to v1.5.1 and remove deprecated methods - #2040

Merged
tariq1890 merged 1 commit into
mainfrom
bump-runc-1.5.1
Sep 1, 2026
Merged

bump runc to v1.5.1 and remove deprecated methods#2040
tariq1890 merged 1 commit into
mainfrom
bump-runc-1.5.1

Conversation

@tariq1890

@tariq1890 tariq1890 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

In runc v1.5.x, the WithProcfd file is no longer available to import so any dependabot bump PRs will fail with compilation errors.

The utils.WithProcfd method is no longer used and has been further simplified to use os.Root.Open() to perform safe file operations and rendering procfd paths directly as /prof/self/fd/<fd-number>. h/t @henry118 for this suggestion

Bonus: This PR also inlines the recommended devices.DeviceFromPath method call as defined in the moby/sys/devices go module.

@github-actions

Copy link
Copy Markdown

Coverage Report for CI Build 33444058247

Coverage decreased (-0.09%) to 43.54%

Details

  • Coverage decreased (-0.09%) from the base build.
  • Patch coverage: 29 uncovered changes across 1 file (0 of 29 lines covered, 0.0%).
  • 5 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
internal/utils/utils.go 29 0 0.0%

Coverage Regressions

5 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
cmd/nvidia-cdi-hook/disable-device-node-modification/params_linux.go 3 0.0%
internal/ldconfig/ldconfig_linux.go 2 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 13459
Covered Lines: 5860
Line Coverage: 43.54%
Coverage Strength: 0.44 hits per line

💛 - Coveralls

@tariq1890
tariq1890 force-pushed the bump-runc-1.5.1 branch 3 times, most recently from 8140850 to 2363e1d Compare August 31, 2026 22:41

@henry118 henry118 left a comment

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.

Thanks for working on this.

IIUC we don't really need the runc implementation here.

With golang 1.24+, I think we can achieve the same with os.Root + manual /proc/self/fd/N

@tariq1890

Copy link
Copy Markdown
Contributor Author

With golang 1.24+, I think we can achieve the same with os.Root + manual /proc/self/fd/N

That's fair. Even less runc code to copy then!

@tariq1890 tariq1890 self-assigned this Aug 31, 2026
@tariq1890
tariq1890 requested a review from henry118 September 1, 2026 00:01
Comment thread internal/utils/utils.go Outdated
@tariq1890
tariq1890 force-pushed the bump-runc-1.5.1 branch 4 times, most recently from ec10008 to e71432a Compare September 1, 2026 03:49
Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com>
Co-Authored-by: Henry Wang <henrwang@nvidia.com>
@tariq1890 tariq1890 changed the title bump runc to v1.5.1 and move away from deprec. method utils.WithProcfd bump runc to v1.5.1 and remove deprecated methods Sep 1, 2026

@henry118 henry118 left a comment

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.

LGTM

func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error {
containerRootDirPath := containerRoot.Name()

hookScratchDirPath := "/run/nvidia-ctk-hook" + uuid.NewString()

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.

Potentially out of scope for this PR, but shouldn't this be hookScratchDirPath := "/run/nvidia-ctk-hook/" + uuid.NewString()? I think there is a typo here. In a running container, I see the below:

root@d2af80a529ad:/# ls -ltr /run/nvidia-ctk-hook*
/run/nvidia-ctk-hook:
total 4
drwxr-xr-x 2 root root 4096 Sep  1 22:20 2c3a944a-b848-4af1-b4b9-d6da24166562

/run/nvidia-ctk-hookb870042d-5b35-4c44-8ac8-ca3ac990d3c9:
total 4
-r--r--r-- 1 root root 1021 Sep  1 22:20 nvct-params

when in reality I am guessing we want:

/run/nvidia-ctk-hook/<uid-1>
/run/nvidia-ctk-hook/<uid-2>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. Agreed that we should be doing a filepath.Join instead of a string concatenate. As discussed, I can make this change in a follow-up PR.

@tariq1890
tariq1890 merged commit e03cd9b into main Sep 1, 2026
21 checks passed
@tariq1890
tariq1890 deleted the bump-runc-1.5.1 branch September 1, 2026 23:44
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.

3 participants