k3s/pkg/util/mount
Kubernetes Submit Queue f34a24e98e
Merge pull request #52401 from andyzhangx/azuredisk-getdevfunc
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix warning messages due to GetMountRefs func not implemented in windows

**What this PR does / why we need it**:
This PR completes the windows implementation of GetMountRefs in mount.go. In linux, the GetMountRefs implementaion is: read `/proc/mounts` and find all mount points, while in Windows, there is no such `/proc/mounts` place which shows all mounting points. 
There is another way in windows, **we could walk through(by `getAllParentLinks` func) the mount path(symbolic link) and get all symlinks until we got the final device, which is actually a drive**.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54670
This PR fixed the warnning issue mentioned in https://github.com/kubernetes/kubernetes/pull/51252

**Special notes for your reviewer**:
Some values in the code would be like follwoing:
```
GetMountRefs: mountPath ("\\var\\lib\\kubelet\\pods/4c74b128-92ca-11e7-b86b-000d3a36d70c/volumes/kubernetes.io~azure-disk/pvc-1cc91c70-92ca-11e7-b86b-000d3a36d70c")
getAllParentLinks: refs (["" "" "c:\\var\\lib\\kubelet\\plugins\\kubernetes.io\\azure-disk\\mounts\\b1246717734" "G:\\"])
basemountPath c:\var\lib\kubelet\plugins\kubernetes.io\azure-disk\mounts
got volumeID b1246717734
```

**Release note**:

```
fix warning messages due to GetMountRefs func not implemented in windows
```
2017-10-27 20:28:36 -07:00
..
BUILD update BUILD files 2017-10-15 18:18:13 -07:00
OWNERS Add owner file in /pkg/util/mount package 2017-02-06 10:51:26 -08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
exec.go Add Exec interface to VolumeHost 2017-08-14 12:16:25 +02:00
fake.go RBD Plugin: Prepare to implement Attacher/Detacher interfaces. 2017-10-25 17:07:27 +08:00
mount.go Merge pull request #52401 from andyzhangx/azuredisk-getdevfunc 2017-10-27 20:28:36 -07:00
mount_linux.go Merge pull request #52401 from andyzhangx/azuredisk-getdevfunc 2017-10-27 20:28:36 -07:00
mount_linux_test.go Share /var/lib/kubernetes on startup 2017-08-30 16:45:04 +02:00
mount_unsupported.go Merge pull request #52401 from andyzhangx/azuredisk-getdevfunc 2017-10-27 20:28:36 -07:00
mount_windows.go Merge pull request #52401 from andyzhangx/azuredisk-getdevfunc 2017-10-27 20:28:36 -07:00
mount_windows_test.go add windows implementation of GetMountRefs 2017-10-17 07:35:18 +00:00
nsenter_mount.go use GetFileType per mount.Interface to check hostpath type 2017-09-26 09:57:06 +08:00
nsenter_mount_test.go Fix findmnt parsing in containerized kubelet 2017-07-18 13:35:44 +02:00
nsenter_mount_unsupported.go use GetFileType per mount.Interface to check hostpath type 2017-09-26 09:57:06 +08:00
safe_format_and_mount_test.go RBD Plugin: Prepare to implement Attacher/Detacher interfaces. 2017-10-25 17:07:27 +08:00