Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman rmi/rm -af and infra containers #1991

Closed
vrothberg opened this issue Dec 12, 2018 · 1 comment
Closed

podman rmi/rm -af and infra containers #1991

vrothberg opened this issue Dec 12, 2018 · 1 comment
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@vrothberg
Copy link
Member

Podman is unable to delete all images (podman rmi -af) when an infra container of a Pod still exists.

The first attempt of podman rmi -af will yield a helpful error message, e.g.:
error removing image da86e6ba6ca197bf6bc5e9d900febd906b133eaa4750e6bed647b0fbe50ed43e: container 05bd830d6625975d8013d6004099c4df92daa050f12637c7e85bd0a1664d6273 using image could not be removed: container 05bd830d6625975d8013d6004099c4df92daa050f12637c7e85bd0a1664d6273 is the infra container of pod 159a2a2b6a937e49340cd251e8543bfe273ea13b61cef63a8cb33d25613fcc26 and cannot be removed without removing the pod

Following attempts of podman rmi -af, however, will only yield a
unable to delete all images; re-run the rmi command again. which isn't very helpful.

If special-casing infra containers is still desired, the descriptive error message should always be printed. If we decide to treat an infra container like any other, we could delete the Pod if it has been paused.

@mheon
Copy link
Member

mheon commented Dec 12, 2018

The first error is pretty good, aside from the duplication of the infra container ID.

The second error is wierd and makes no sense - did something we do alter the state? We shouldn't be modifying images we don't end up removing, I think?

@mheon mheon added the bug label Dec 12, 2018
@baude baude self-assigned this Dec 17, 2018
baude added a commit to baude/podman that referenced this issue Dec 17, 2018
when deleting infra containers, we were not checking the error of the
image deletion and therefore resulting in not reporting the error.

Fixes containers#1991

Signed-off-by: baude <bbaude@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

3 participants