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

Image conflict should return HTTP 409 #14208

Closed
tacerus opened this issue May 11, 2022 · 2 comments · Fixed by #14228
Closed

Image conflict should return HTTP 409 #14208

tacerus opened this issue May 11, 2022 · 2 comments · Fixed by #14228
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@tacerus
Copy link

tacerus commented May 11, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

Steps to reproduce the issue:

  1. Attempt to delete image which is still being used by a container using DELETE /images/sha256:xxxx

Describe the results you received:

API returns HTTP 500.

Describe the results you expected:

Given the Docker API returns the more appropriate HTTP 409 (CONFLICT), I expected Podman to return 409 as well.

Additional information you deem important (e.g. issue happens only occasionally):

I think it would not only be more appropriate to use a HTTP response with the matching description, but I too think it would help compatibility with Docker API clients.
In my case I am using the Docker Java API, which would return a appropriate conflict exception on Docker's 409 response, whereas Podman's 500 results in a very generic server error.

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label May 11, 2022
@vrothberg
Copy link
Member

@jwhonce PTAL

rhatdan added a commit to rhatdan/podman that referenced this issue May 16, 2022
Fixes: containers#14208

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@tacerus
Copy link
Author

tacerus commented May 19, 2022

Thank you so much, @rhatdan! Much appreciated.

cdoern pushed a commit to cdoern/podman that referenced this issue May 27, 2022
Fixes: containers#14208

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
mheon pushed a commit to mheon/libpod that referenced this issue Jun 14, 2022
Fixes: containers#14208

Signed-off-by: Daniel J Walsh <dwalsh@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants