-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 image rm -f returns an status code of 1 when it should return 0 #14612
Comments
Thanks for reaching out, @crowleydi. @containers/podman-maintainers WDYT? |
I think Docker is correct, as long as when the command ends the container is gone, with --force podman should exit with 0. |
I concur. When doing the change, we should probably update the description of |
Docker does not support the ignore flag. Although I am not crazy about the error being output. |
We should not just do containers either
docker network rm does not support --force, but we should exit with 0.
podman pod rm --force This calls for interns to fix up. Or if @crowleydi wants to open a PR. Hint Hint. |
Could I take a shot at this one? |
Sure, thank you! |
A friendly reminder that this issue had no activity for 30 days. |
I thought I was going to have some time to work on this but I was wrong. I'll remove myself. |
This Patch will cause podman COMMAND rm --force bogus not fail This is how Docker works, so Podman should follow this to allow existing scripts to convert from Docker to Podman. Fixes: containers#14612 Oprignal version of this patch came from wufan [email protected] Signed-off-by: Daniel J Walsh <[email protected]>
This Patch will cause podman COMMAND rm --force bogus not fail This is how Docker works, so Podman should follow this to allow existing scripts to convert from Docker to Podman. Fixes: containers#14612 Oprignal version of this patch came from wufan [email protected] Signed-off-by: Daniel J Walsh <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
If you run
podman image rm -f non_existent_image
and the image doesn't exist, it returns a status code of 1.If you run
docker image rm -f non_existent_image
and the image doesn't exist, it returns a status code of 0.For scripting compatibility between
docker
andpodman
,podman
should return a status code of 0 for this situation. That is one of the points of specifying-f
.Steps to reproduce the issue:
podman image rm -f foobar
echo $?
Describe the results you received:
return code is 1
Describe the results you expected:
return code should be 0
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:affects older versions as well
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
RHEL 8 VM, Mac OSX
The text was updated successfully, but these errors were encountered: