-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
volume mapping would fail when hostPath is a symbolic link to a drive and containerPath is a dir path on Windows #34729
Comments
Automatic merge from submit-queue Azuredisk mount on windows node **What this PR does / why we need it**: This PR will enable azure disk on windows node, customer could create a pod mounted with azure disk on windows node. There are a few pending items still left: 1) Current fstype would be forced as NTFS, will change if there is such requirement 2) GetDeviceNameFromMount function is not implemented(empty) because in Linux, we could use "cat /proc/mounts" to read all mounting points in OS easily, but in Windows, there is no such place, I am still figuring out. The empty function would cause a few warning logging, but it will not affect the main logic now. **Special notes for your reviewer**: 1. This PR depends on #51240, which allow windows mount path in config validation 2. There is a bug in docker on windows(moby/moby#34729), the ContainerPath could only be a drive letter now(e.g. D:), dir path would fail in the end. The example pod with mount path is like below: ``` kind: Pod apiVersion: v1 metadata: name: pod-uses-shared-hdd-5g labels: name: storage spec: containers: - image: microsoft/iis name: az-c-01 volumeMounts: - name: blobdisk01 mountPath: 'F:' nodeSelector: beta.kubernetes.io/os: windows volumes: - name: blobdisk01 persistentVolumeClaim: claimName: pv-dd-shared-hdd-5 ``` **Release note**: ```release-note
I have identified this bug only exists in windows server 2016, RS3 image won’t have such issue. |
@AndyZhang so the issue is resolved in RS3? If so, ok to close this one? |
Agreed - I think we can close with recommendation to use Windows Server version 1709 |
Thanks! |
@thaJeztah @PatrickLang unfortunately this bug still exists in RS3 image, it's not a so obvious issue though. |
Description
Under docker on Windows(2016 or RS3 image) env, when HostPath is a symbolic link to a drive, ContainerPath could only be a driver letter(e.g. F:), while if it's a dir path(e.g. c:\mnt), the volume mapping will fail.
Below volume mapping would fail:
docker run -d -v C:\symlink:c:\mnt --name iis microsoft/iis
While below volume mapping would succeed:
docker run -d -v C:\symlink:e: --name iis microsoft/iis
Steps to reproduce the issue:
cd c:\mnt
Describe the results you received:
Describe the results you expected:
I could explore mnt folder
Additional information you deem important (e.g. issue happens only occasionally):
I have identified this bug only exists in windows server 2016, RS3 image won’t have such issue.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: