Enforce isDir, elliminates message in kubelet.log

This commit is contained in:
derekwaynecarr 2014-08-18 12:05:08 -04:00
parent 053e75d8e9
commit 39293eaf56

View File

@ -167,6 +167,9 @@ func GetCurrentVolumes(rootDirectory string) map[string]Cleaner {
// Volume information is extracted from the directory structure:
// (ROOT_DIR)/(POD_ID)/volumes/(VOLUME_KIND)/(VOLUME_NAME)
for _, podIDDir := range podIDDirs {
if !podIDDir.IsDir() {
continue
}
podID := podIDDir.Name()
podIDPath := path.Join(mountPath, podID, "volumes")
volumeKindDirs, err := ioutil.ReadDir(podIDPath)