Fix mount options not propagated to containers (noexec, nosuid, nodev)#1015
Fix mount options not propagated to containers (noexec, nosuid, nodev)#1015
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. DetailsInstructions 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 <4178417+andyzhangx@users.noreply.github.com>
|
[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. DetailsNeeds 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. DetailsNeeds 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 <4178417+andyzhangx@users.noreply.github.com>
- Use same force unmount pattern as NodeUnpublishVolume for cleanup - Ensures proper cleanup even if mount is stuck Co-authored-by: andyzhangx <4178417+andyzhangx@users.noreply.github.com>
|
PR needs rebase. DetailsInstructions 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. |
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
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.