mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #41626 from derekwaynecarr/improve-kubelet-volume-logging
Automatic merge from submit-queue (batch tested with PRs 41649, 41658, 41266, 41371, 41626) Understand why kubelet cannot cleanup orphaned pod dirs **What this PR does / why we need it**: Understand if we are unable to clean up orphaned pod directories due to a failure to read the directory versus paths still existing to improve ability to debug error situations.
This commit is contained in:
commit
7bbafd259c
@ -106,8 +106,12 @@ func (kl *Kubelet) cleanupOrphanedPodDirs(
|
||||
}
|
||||
// If there are still volume directories, do not delete directory
|
||||
volumePaths, err := kl.getPodVolumePathListFromDisk(uid)
|
||||
if err != nil || len(volumePaths) > 0 {
|
||||
glog.Errorf("Orphaned pod %q found, but error %v occured during reading volume dir from disk", uid, err)
|
||||
if err != nil {
|
||||
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
|
||||
}
|
||||
glog.V(3).Infof("Orphaned pod %q found, removing", uid)
|
||||
|
Loading…
Reference in New Issue
Block a user