mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Merge pull request #933 from derekwaynecarr/issue_878
Enforce isDir, elliminates message in kubelet.log
This commit is contained in:
commit
53f53516f6
@ -167,6 +167,9 @@ func GetCurrentVolumes(rootDirectory string) map[string]Cleaner {
|
|||||||
// Volume information is extracted from the directory structure:
|
// Volume information is extracted from the directory structure:
|
||||||
// (ROOT_DIR)/(POD_ID)/volumes/(VOLUME_KIND)/(VOLUME_NAME)
|
// (ROOT_DIR)/(POD_ID)/volumes/(VOLUME_KIND)/(VOLUME_NAME)
|
||||||
for _, podIDDir := range podIDDirs {
|
for _, podIDDir := range podIDDirs {
|
||||||
|
if !podIDDir.IsDir() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
podID := podIDDir.Name()
|
podID := podIDDir.Name()
|
||||||
podIDPath := path.Join(mountPath, podID, "volumes")
|
podIDPath := path.Join(mountPath, podID, "volumes")
|
||||||
volumeKindDirs, err := ioutil.ReadDir(podIDPath)
|
volumeKindDirs, err := ioutil.ReadDir(podIDPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user