mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Add warnings after cleanup back
This commit is contained in:
parent
80e9bd30ea
commit
89d72977d7
@ -135,6 +135,8 @@ func (kl *Kubelet) cleanupOrphanedPodDirs(pods []*v1.Pod, runningPods []*kubecon
|
|||||||
if err := syscall.Rmdir(volumePath); err != nil {
|
if err := syscall.Rmdir(volumePath); err != nil {
|
||||||
orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but failed to rmdir() volume at path %v: %v", uid, volumePath, err))
|
orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but failed to rmdir() volume at path %v: %v", uid, volumePath, err))
|
||||||
allVolumesCleanedUp = false
|
allVolumesCleanedUp = false
|
||||||
|
} else {
|
||||||
|
klog.Warningf("Cleaned up orphaned volume from pod %q at %s", uid, volumePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,6 +152,8 @@ func (kl *Kubelet) cleanupOrphanedPodDirs(pods []*v1.Pod, runningPods []*kubecon
|
|||||||
if err := syscall.Rmdir(subpathVolumePath); err != nil {
|
if err := syscall.Rmdir(subpathVolumePath); err != nil {
|
||||||
orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but failed to rmdir() subpath at path %v: %v", uid, subpathVolumePath, err))
|
orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but failed to rmdir() subpath at path %v: %v", uid, subpathVolumePath, err))
|
||||||
allVolumesCleanedUp = false
|
allVolumesCleanedUp = false
|
||||||
|
} else {
|
||||||
|
klog.Warningf("Cleaned up orphaned volume subpath from pod %q at %s", uid, subpathVolumePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user