Skip to content

fix: disable chmod hook - #1942

Merged
rajatchopra merged 1 commit into
NVIDIA:mainfrom
rajatchopra:disablechmod
Sep 21, 2026
Merged

rajatchopra merged 1 commit into
NVIDIA:mainfrom
rajatchopra:disablechmod

Conversation

@rajatchopra

Copy link
Copy Markdown
Contributor

Chmod hook was deprecated earlier. We can disable it now. Any code requiring correct access to /dev/dri does not need this backward compatible hook as crun has a fix now. For more details, see #1221

Existing CDI specs invoking chmod will now use the unsupported-hook handler: they emit a warning, perform no chmod, and do not prevent container startup.

@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rajatchopra rajatchopra changed the title fix: Disable chmod hook fix: disable chmod hook Jul 14, 2026
@rajatchopra
rajatchopra marked this pull request as draft July 14, 2026 15:55
@rajatchopra
rajatchopra force-pushed the disablechmod branch 2 times, most recently from 6015ddc to d60cdf6 Compare July 15, 2026 17:55
@rajatchopra
rajatchopra marked this pull request as ready for review July 16, 2026 14:45

@cdesiniotis cdesiniotis 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.

Since this hook has been deprecated and off by default (since the 1.18.0 release, see commit), I think the next step would be to remove it entirely (instead of adding extra logic to prevent one from enabling it).

Comment thread internal/discover/hooks.go Outdated
Comment thread internal/discover/hooks.go Outdated
Comment thread cmd/nvidia-ctk/cdi/generate/generate_test.go Outdated
command := ConfigureCDIHookCommand(&logger.NullLogger{}, &cli.Command{})

require.Nil(t, command.Command("chmod"))
require.NotNil(t, command.Command("create-symlinks"))

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.

Question -- Is this returning an error because the create-symlinks hook fails in this context (e.g. the right set of arguments are not provided)?

Comment thread internal/discover/hooks.go Outdated
@coveralls

coveralls commented Sep 3, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 34900314396

Coverage increased (+0.03%) to 44.122%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13558
Covered Lines: 5982
Line Coverage: 44.12%
Coverage Strength: 0.44 hits per line

💛 - Coveralls

Comment thread internal/discover/hooks_test.go
Comment thread internal/discover/hooks_test.go
Comment thread pkg/nvcdi/management.go Outdated
  - Deleted the nvidia-cdi-hook chmod implementation.
  - Deleted the device-folder-permissions workaround that emitted chmod hooks.
  - Kept the unsupported-command behavior, so legacy CDI specs invoking chmod still warn and don’t block startup.
  - Suitably modified the unit tests

Signed-off-by: Rajat Chopra <rajatc@nvidia.com>
@rajatchopra
rajatchopra merged commit 84e2c2c into NVIDIA:main Sep 21, 2026
21 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.

4 participants