Skip to content

Add rprivate to CDI mount options #980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025

Conversation

elezar
Copy link
Member

@elezar elezar commented Mar 10, 2025

This ensures that mount propagation is set to rprivate for mounts from the host into the container. This aligns with the default in docker.

This would also prevent issues such as #697

@elezar elezar self-assigned this Mar 10, 2025
@elezar elezar force-pushed the add-rprivate-to-mount-options branch from 2563d17 to a4956e6 Compare March 10, 2025 08:50
@elezar elezar added this to the v1.18.0 milestone Mar 19, 2025
@ArangoGutierrez ArangoGutierrez requested a review from Copilot May 6, 2025 09:50
Copy link

@Copilot 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 ensures that mount propagation is set to rprivate for host-to-container mounts by replacing the "bind" option with "rbind" and adding "rprivate".

  • Updates test files and production code to use the updated mount options.
  • Aligns mount options configuration with Docker’s default behavior to prevent propagation issues.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/platform-support/tegra/csv_test.go Updated mount options in CSV-related test cases
internal/discover/mounts_test.go Updated mount options in mount tests
internal/discover/mounts.go Modified the production mount configuration
internal/discover/mounts-to-container-path_test.go Updated mount options in container-path test cases
internal/discover/mounts-to-container-path.go Updated mount options in container-path logic
internal/discover/ipc_test.go Updated mount options in IPC mount tests
cmd/nvidia-ctk/cdi/generate/generate_test.go Updated mount options in CDI generation tests
cmd/nvidia-ctk-installer/container/toolkit/toolkit_test.go Updated mount options in installer tests

Copy link
Collaborator

@ArangoGutierrez ArangoGutierrez left a comment

Choose a reason for hiding this comment

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

PR should be ready after rebase

This ensures that mount propagation is set to rprivate for
mounts from the host into the container. This aligns with the
default in docker.

Signed-off-by: Evan Lezar <[email protected]>
@elezar elezar force-pushed the add-rprivate-to-mount-options branch from a4956e6 to d0103aa Compare May 9, 2025 13:16
@elezar elezar requested a review from ArangoGutierrez May 9, 2025 13:16
Copy link
Collaborator

@ArangoGutierrez ArangoGutierrez left a comment

Choose a reason for hiding this comment

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

LGTM

@elezar elezar merged commit 6dfd63f into NVIDIA:main May 16, 2025
16 checks passed
@elezar elezar deleted the add-rprivate-to-mount-options branch May 16, 2025 05:53
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