-
Notifications
You must be signed in to change notification settings - Fork 349
Support symlinks for Filesystem mode local volumes to avoid nested mount issues #535
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. 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. |
- Modified IsLikelyMountPoint to accept symlinks pointing to mount points - Updated discovery logic to resolve symlinks and use target path as PV HostPath - Added documentation explaining the new symlink approach - This fixes nested mount point issues that prevent Pod termination 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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
- Clarified Windows IsLikelyMountPoint implementation - Added comment explaining consistency with Linux approach - All tests pass successfully Co-authored-by: andyzhangx <[email protected]>
- Improved error handling in discovery logic - Added better logging when lstat fails - Enhanced documentation for Windows platform differences - Simplified code flow by handling outsidePath update properly Co-authored-by: andyzhangx <[email protected]>
- Explained why symlink resolution is separate from validation - Clarified the two-step process: validation and resolution - All tests continue to pass Co-authored-by: andyzhangx <[email protected]>
Nested mount points under local PV paths prevent kubelet from unmounting volumes, causing Pod termination failures. This adds symlink support for Filesystem mode volumes, allowing the provisioner to resolve symlinks to their mount point targets and use those paths in PV specs.
Changes
Volume discovery
IsLikelyMountPointnow accepts symlinks pointing to mount points (Linux) in addition to direct mount pointsDocumentation
Example
Current approach (bind mount):
mount /dev/sda1 /mnt/disk-uuid mkdir /mnt/disks/disk-uuid mount --bind /mnt/disk-uuid /mnt/disks/disk-uuid # Creates nested mountRecommended approach (symlink):
mount /dev/sda1 /mnt/disk-uuid ln -s /mnt/disk-uuid /mnt/disks/disk-uuid # Provisioner resolves to /mnt/disk-uuidPV will reference
/mnt/disk-uuiddirectly, avoiding mount point nesting under kubelet's volume paths.Backward compatibility
Direct mount points in the discovery directory continue to work unchanged.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
get.helm.sh/usr/bin/curl curl -s REDACTED ux_amd64/vet -v sioner/sig-storage-local-static--c=4 cal-static-provisioner/sig-stora-nolocalimports ux_amd64/vet cation/request/w/opt/hostedtoolcache/go/1.24.11/x64/pkg/tool/linux_amd64/vet g x64/pkg/tool/lin/tmp/go-build3579612690/b1513/vet.cfg ux_amd64/vet -v sioner/sig-storage-local-static-provisioner/vendor/k8s.io/kubernetes/pkg/scheduler/framework/cycgit sioner/sig-storage-local-static-provisioner/vendor/k8s.io/kubernetes/pkg/scheduler/framework/evefor-each-ref ux_amd64/vet errors/doc.go errors/storage.g-v x64/pkg/tool/lin/tmp/go-build3579612690/b1631/vet.cfg ux_amd64/vet(dns block)If you need me to access, download, or install something from one of these locations, you can either:
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.