mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
realContainerGC reports warning when err is nil
This commit is contained in:
parent
8cbe9c997a
commit
aff10f57bb
@ -207,7 +207,7 @@ func (cgc *realContainerGC) removeOldestN(containers []containerGCInfo, toRemove
|
||||
}
|
||||
symlinkPath := dockertools.LogSymlink(cgc.containerLogsDir, containers[i].podNameWithNamespace, containers[i].containerName, containers[i].id)
|
||||
err = os.Remove(symlinkPath)
|
||||
if !os.IsNotExist(err) {
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
glog.Warningf("Failed to remove container %q log symlink %q: %v", containers[i].name, symlinkPath, err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user