-
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
libpod api will not return stats if the container is exited #15218
Comments
@mheon PTAL |
We got a feature request in to allow this for the Docker-compat endpoints, so we enabled it there; never enabled it for the Libpod endpoints because nobody asked. Should be simple enough. |
Actually, this might be expected behavior... Let me verify against the Docker endpoints. |
Verified against Docker, this is expected behavior. If the container is not started, we return nothing, same as Docker. Going to close given this. |
the problem is, this change bring from cli, maybe related to #14580, I do not know. previous version like podman v4.0.3, the cli will result in: and the libpod api will return:
which breaking exists code like: which will cause nomad never got notified even the container exited with code 0 I checked the changelog v4.1.1:
the changelog says Because this is a breaking change to the api. |
…dy if the container is exited Refs: containers/podman#14498 containers/podman#15218
It's a change, but I don't know if I would consider it a breaking change? It's a bugfix more than anything, given we did not match existing behavior / expected behavior vs Docker |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
according to #14580
Non-running containers now report statistics via the podman stats
but I see the result for libpod api is : return nothing.
Steps to reproduce the issue:
podman run --name demo -ti alpine sh -c 'echo hello'
sudo podman stats --no-stream demo
get:Describe the results you received:
nothing but a 200 code
Describe the results you expected:
zero stats just like the cli or it should return http error code ?
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):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.):
The text was updated successfully, but these errors were encountered: