Unverified Commit 0575f728 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #55020 from derekwaynecarr/fix-spam

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. StopPodSandbox should not log when container is already removed **What this PR does / why we need it**: StopPodSandbox should not log when a container is already gone. It should only log if it could not stop and the container was still present. Fixes https://github.com/kubernetes/kubernetes/issues/55021 **Special notes for your reviewer**: This was seen in our production logs, need to eliminate spam. **Release note**: ```release-note NONE ```
parents 63c40972 79a08a1c
...@@ -239,9 +239,9 @@ func (ds *dockerService) StopPodSandbox(podSandboxID string) error { ...@@ -239,9 +239,9 @@ func (ds *dockerService) StopPodSandbox(podSandboxID string) error {
} }
} }
if err := ds.client.StopContainer(podSandboxID, defaultSandboxGracePeriod); err != nil { if err := ds.client.StopContainer(podSandboxID, defaultSandboxGracePeriod); err != nil {
glog.Errorf("Failed to stop sandbox %q: %v", podSandboxID, err)
// Do not return error if the container does not exist // Do not return error if the container does not exist
if !libdocker.IsContainerNotFoundError(err) { if !libdocker.IsContainerNotFoundError(err) {
glog.Errorf("Failed to stop sandbox %q: %v", podSandboxID, err)
errList = append(errList, err) errList = append(errList, err)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment