pacoxu / kubernetes

Production-Grade Container Scheduling and Management
https://kubernetes.io
Apache License 2.0
2 stars 4 forks source link

Until the bug - https://github.com/golang/go/issues/33357 is fixed, os.stat woul... #1760

Open github-actions[bot] opened 3 years ago

github-actions[bot] commented 3 years ago

Until the bug - https://github.com/golang/go/issues/33357 is fixed, os.stat wouldn't return the

right mode(socket) on windows. Hence deleting the file, without checking whether

its a socket, on windows.

https://github.com/pacoxu/kubernetes/blob/628f5f99fed4c277c3e3b94b83d229ee97ad0919/pkg/kubelet/cm/devicemanager/manager.go#L214

            continue
        }
        // TODO: Until the bug - https://github.com/golang/go/issues/33357 is fixed, os.stat wouldn't return the
        // right mode(socket) on windows. Hence deleting the file, without checking whether
        // its a socket, on windows.
        stat, err := os.Lstat(filePath)
        if err != nil {
            klog.Errorf("Failed to stat file %s: %v", filePath, err)
            continue
ndex 9034498c66f4f..5c8c320223e51 100644
++ b/pkg/kubelet/cm/devicemanager/manager_test.go

c4f217379f72bfed955e19449571e430c35e7995