mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Discard errors when a pod is already removed
This was causing some CI flakes. I'm pretty sure that the pods being removed already isn't a bug, but just the result of another container in the pod removing it first - so no reason not to ignore the errors. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -795,7 +795,7 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, opts ctrRmO
|
||||
for ctr, err := range podRemovedCtrs {
|
||||
removedCtrs[ctr] = err
|
||||
}
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, define.ErrNoSuchPod) && !errors.Is(err, define.ErrPodRemoved) {
|
||||
removedPods[depPod.ID()] = err
|
||||
retErr = fmt.Errorf("error removing container %s dependency pods: %w", c.ID(), err)
|
||||
return
|
||||
@ -817,7 +817,7 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, opts ctrRmO
|
||||
for ctr, err := range podRemovedCtrs {
|
||||
removedCtrs[ctr] = err
|
||||
}
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, define.ErrNoSuchPod) && !errors.Is(err, define.ErrPodRemoved) {
|
||||
removedPods[pod.ID()] = err
|
||||
retErr = fmt.Errorf("error removing container %s pod: %w", c.ID(), err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user