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

Container kill does not return 409 error code for stopped containers #19368

Closed
lukasmrtvy opened this issue Jul 26, 2023 · 1 comment · Fixed by #19413
Closed

Container kill does not return 409 error code for stopped containers #19368

lukasmrtvy opened this issue Jul 26, 2023 · 1 comment · Fixed by #19413
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@lukasmrtvy
Copy link

lukasmrtvy commented Jul 26, 2023

Issue Description

podman kill ( compat / libpod ) does not return 409 error code ( https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerKill ) for stopped containers

Steps to reproduce the issue

Steps to reproduce the issue

  1. podman -r run -d --name nginx nginx
  2. podman -r stop nginx
  3. podman -r kill nginx

Describe the results you received

{"cause":"container state improper","message":"can only kill running containers. 6830d229c01064f76b9de62b76b80492fe4d08136c7b459bc0de926b1581093f is in state exited: container state improper","response":500}

Describe the results you expected

409 is returned

podman info output

4.6.0

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

No response

@lukasmrtvy lukasmrtvy added the kind/bug Categorizes issue or PR as related to a bug. label Jul 26, 2023
@vrothberg
Copy link
Member

Thanks for reaching out, @lukasmrtvy !

vrothberg added a commit to vrothberg/libpod that referenced this issue Jul 28, 2023
If the container isn't running, make sure to return 409 as specified in
the Docker API [1] and the Podman reference.

[1] https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerKill

Fixes: containers#19368
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue Jul 31, 2023
If the container isn't running, make sure to return 409 as specified in
the Docker API [1] and the Podman reference.

[1] https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerKill

Fixes: containers#19368
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue Jul 31, 2023
If the container isn't running, make sure to return 409 as specified in
the Docker API [1] and the Podman reference.

[1] https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerKill

Fixes: containers#19368
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/podman that referenced this issue Aug 1, 2023
If the container isn't running, make sure to return 409 as specified in
the Docker API [1] and the Podman reference.

[1] https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerKill

Fixes: containers#19368
Signed-off-by: Valentin Rothberg <vrothberg@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 Oct 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. 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