StopPodSandbox should not log when container is already removed

pull/6/head
Derek Carr 2017-11-02 15:11:15 -04:00
parent 444a161d22
commit 79a08a1c90
1 changed files with 1 additions and 1 deletions

View File

@ -239,9 +239,9 @@ func (ds *dockerService) StopPodSandbox(podSandboxID string) error {
}
}
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
if !libdocker.IsContainerNotFoundError(err) {
glog.Errorf("Failed to stop sandbox %q: %v", podSandboxID, err)
errList = append(errList, err)
}
}