-
Notifications
You must be signed in to change notification settings - Fork 293
Fix mount options not propagated to containers (noexec, nosuid, nodev) #1015
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
base: master
Are you sure you want to change the base?
Conversation
|
Hi @Copilot. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
- Add STAGE_UNSTAGE_VOLUME capability to driver - Implement NodeStageVolume to mount NFS share at staging path with all mount options - Modify NodePublishVolume to bind mount from staging to target and remount with security options - Implement NodeUnstageVolume to properly unmount staged volumes - Add comprehensive tests for staging and unstaging functionality - Maintain backward compatibility with legacy direct mount path Co-authored-by: andyzhangx <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
- Add subDirReplaceMap to handle pv/pvc metadata in subDir during staging - Ensure consistent behavior between staging and legacy mount paths Co-authored-by: andyzhangx <[email protected]>
- Use same force unmount pattern as NodeUnpublishVolume for cleanup - Ensures proper cleanup even if mount is stuck Co-authored-by: andyzhangx <[email protected]>
What type of PR is this?
/kind bug
What this PR does / why we need it:
Mount options like
noexec,nosuid, andnodevspecified in StorageClass or PersistentVolume were applied at the node NFS mount but not visible inside containers. Linux bind mounts don't inherit security mount options from source mounts.Solution:
Implement CSI staging/unstaging workflow:
Changes:
STAGE_UNSTAGE_VOLUMEcapabilityNodePublishVolumeto remount bind mounts with security optionsKey insight: After bind mount, explicit remount operation required to apply security options:
Which issue(s) this PR fixes:
Special notes for your reviewer:
This changes the driver's advertised capabilities to include
STAGE_UNSTAGE_VOLUME. Kubernetes will use the staging workflow for new mounts. Existing mounts continue to work via the legacy direct mount path.Does this PR introduce a user-facing change?:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.