k3s/pkg/util
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
..
async update BUILD files 2017-10-15 18:18:13 -07:00
bandwidth update BUILD files 2017-10-15 18:18:13 -07:00
config update BUILD files 2017-10-15 18:18:13 -07:00
configz update BUILD files 2017-10-15 18:18:13 -07:00
dbus Merge pull request #53731 from smarterclayton/dbus_races 2017-10-26 13:24:30 -07:00
ebtables update BUILD files 2017-10-15 18:18:13 -07:00
env update BUILD files 2017-10-15 18:18:13 -07:00
file Adding unit tests to methods of file's util 2017-10-24 08:26:58 +08:00
filesystem update BUILD files 2017-10-15 18:18:13 -07:00
flock update BUILD files 2017-10-15 18:18:13 -07:00
goroutinemap update BUILD files 2017-10-15 18:18:13 -07:00
hash update BUILD files 2017-10-15 18:18:13 -07:00
initsystem update BUILD files 2017-10-15 18:18:13 -07:00
interrupt update BUILD files 2017-10-15 18:18:13 -07:00
io update BUILD files 2017-10-15 18:18:13 -07:00
ipconfig update BUILD files 2017-10-15 18:18:13 -07:00
iptables update BUILD files 2017-10-15 18:18:13 -07:00
ipvs update BUILD files 2017-10-15 18:18:13 -07:00
keymutex update BUILD files 2017-10-15 18:18:13 -07:00
labels update BUILD files 2017-10-15 18:18:13 -07:00
limitwriter update BUILD files 2017-10-15 18:18:13 -07:00
maps update BUILD files 2017-10-15 18:18:13 -07:00
metrics update BUILD files 2017-10-15 18:18:13 -07:00
mount Merge pull request #52401 from andyzhangx/azuredisk-getdevfunc 2017-10-27 20:28:36 -07:00
net update BUILD files 2017-10-15 18:18:13 -07:00
netsh Adding unit tests to methods of netsh 2017-10-26 11:18:09 +08:00
node use core client with explicit version globally 2017-10-27 15:48:32 +08:00
nsenter update BUILD files 2017-10-15 18:18:13 -07:00
oom update BUILD files 2017-10-15 18:18:13 -07:00
parsers update BUILD files 2017-10-15 18:18:13 -07:00
pointer update BUILD files 2017-10-15 18:18:13 -07:00
procfs update BUILD files 2017-10-15 18:18:13 -07:00
reflector/prometheus update BUILD files 2017-10-15 18:18:13 -07:00
removeall update BUILD files 2017-10-15 18:18:13 -07:00
resourcecontainer update BUILD files 2017-10-15 18:18:13 -07:00
rlimit update BUILD files 2017-10-15 18:18:13 -07:00
selinux update BUILD files 2017-10-15 18:18:13 -07:00
slice update BUILD files 2017-10-15 18:18:13 -07:00
strings update BUILD files 2017-10-15 18:18:13 -07:00
sysctl update BUILD files 2017-10-15 18:18:13 -07:00
system update BUILD files 2017-10-15 18:18:13 -07:00
tail update BUILD files 2017-10-15 18:18:13 -07:00
taints Added unit test cases for the public methods of pkg/util/taints.go 2017-10-25 13:51:14 +08:00
template update BUILD files 2017-10-15 18:18:13 -07:00
term update BUILD files 2017-10-15 18:18:13 -07:00
threading update BUILD files 2017-10-15 18:18:13 -07:00
tolerations update BUILD files 2017-10-15 18:18:13 -07:00
version update BUILD files 2017-10-15 18:18:13 -07:00
workqueue/prometheus update BUILD files 2017-10-15 18:18:13 -07:00
BUILD auto-gen 2017-09-26 09:57:13 +08:00
verify-util-pkg.sh verify pkg/util contains no code 2017-08-17 15:28:27 +08:00