mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
kubelet volumes cleanupOrphanedPodDirs does not distinguish error from found volume paths
This commit is contained in:
parent
1aa0606a81
commit
f1b7621f42
@ -106,8 +106,12 @@ func (kl *Kubelet) cleanupOrphanedPodDirs(
|
|||||||
}
|
}
|
||||||
// If there are still volume directories, do not delete directory
|
// If there are still volume directories, do not delete directory
|
||||||
volumePaths, err := kl.getPodVolumePathListFromDisk(uid)
|
volumePaths, err := kl.getPodVolumePathListFromDisk(uid)
|
||||||
if err != nil || len(volumePaths) > 0 {
|
if err != nil {
|
||||||
glog.Errorf("Orphaned pod %q found, but error %v occured during reading volume dir from disk", uid, err)
|
glog.Errorf("Orphaned pod %q found, but error %v occurred during reading volume dir from disk", uid, err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if len(volumePaths) > 0 {
|
||||||
|
glog.Errorf("Orphaned pod %q found, but volume paths are still present on disk.", uid)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
glog.V(3).Infof("Orphaned pod %q found, removing", uid)
|
glog.V(3).Infof("Orphaned pod %q found, removing", uid)
|
||||||
|
Loading…
Reference in New Issue
Block a user