mirror of
https://github.com/containers/podman.git
synced 2025-08-24 10:04:57 +08:00
Make RemoveContainer return containers and pods removed
This allows for accurate reporting of dependency removal, but the work is still incomplete: pods can be removed, but do not report the containers they removed as part of said removal. Will add this in a subsequent commit. Major note: I made ignoring no-such-container errors automatic once it has been determined that a container did exist in the first place. I can't think of any case where this would not be a TOCTOU - IE, no reason not to ignore them. The `--ignore` option to `podman rm` should still retain meaning as it will ignore errors from containers that didn't exist in the first place. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -142,7 +142,8 @@ func (r *Runtime) removeMalformedPod(ctx context.Context, p *Pod, ctrs []*Contai
|
||||
ctrNamedVolumes[vol.Name] = vol
|
||||
}
|
||||
|
||||
return r.removeContainer(ctx, ctr, force, false, true, true, false, false, timeout)
|
||||
_, _, err := r.removeContainer(ctx, ctr, force, false, true, true, false, false, timeout)
|
||||
return err
|
||||
}()
|
||||
|
||||
if removalErr == nil {
|
||||
|
Reference in New Issue
Block a user