• Kubernetes Submit Queue's avatar
    Merge pull request #52401 from andyzhangx/azuredisk-getdevfunc · f34a24e9
    Kubernetes Submit Queue authored
    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
    ```
    f34a24e9
Name
Last commit
Last update
..
async Loading commit data...
bandwidth Loading commit data...
config Loading commit data...
configz Loading commit data...
dbus Loading commit data...
ebtables Loading commit data...
env Loading commit data...
file Loading commit data...
filesystem Loading commit data...
flock Loading commit data...
goroutinemap Loading commit data...
hash Loading commit data...
initsystem Loading commit data...
interrupt Loading commit data...
io Loading commit data...
ipconfig Loading commit data...
iptables Loading commit data...
ipvs Loading commit data...
keymutex Loading commit data...
labels Loading commit data...
limitwriter Loading commit data...
maps Loading commit data...
metrics Loading commit data...
mount Loading commit data...
net Loading commit data...
netsh Loading commit data...
node Loading commit data...
nsenter Loading commit data...
oom Loading commit data...
parsers Loading commit data...
pointer Loading commit data...
procfs Loading commit data...
reflector/prometheus Loading commit data...
removeall Loading commit data...
resourcecontainer Loading commit data...
rlimit Loading commit data...
selinux Loading commit data...
slice Loading commit data...
strings Loading commit data...
sysctl Loading commit data...
system Loading commit data...
tail Loading commit data...
taints Loading commit data...
template Loading commit data...
term Loading commit data...
threading Loading commit data...
tolerations Loading commit data...
version Loading commit data...
workqueue/prometheus Loading commit data...
BUILD Loading commit data...
verify-util-pkg.sh Loading commit data...