libpod: accept "dead" and "restarting" in container status filter#28932
Closed
amarkdotdev wants to merge 1 commit into
Closed
libpod: accept "dead" and "restarting" in container status filter#28932amarkdotdev wants to merge 1 commit into
amarkdotdev wants to merge 1 commit into
Conversation
The API documentation states that status filter accepts "dead" and "restarting" (matching Docker API behavior), but StringToContainerStatus did not recognize these values, returning "unknown container state" errors. Add Docker-compatible aliases: - "dead" maps to ContainerStateExited (Docker uses "dead" for containers that failed to be removed) - "restarting" maps to ContainerStateStopping (Podman does not have a dedicated restarting state; stopping is the closest equivalent) Fixes podman-container-tools#28904 Signed-off-by: amarkdotdev <amarkdotdev@users.noreply.github.com> Signed-off-by: amarkdotdev <64331623+amarkdotdev@users.noreply.github.com>
Author
|
Closing this PR. Podman's LLM policy requires that contributions be written and described by the human author in their own words, and this PR was prepared with AI assistance that did not meet that bar. I will not resubmit unless I can do so in line with the policy. Apologies for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Does this PR fix an issue?
Fixes #28904
Description
The API documentation states that the
statusfilter acceptsdeadandrestarting(matching Docker API behavior), butStringToContainerStatusdid not recognize these values, returning a 500 error withunknown container state.Changes
Add Docker-compatible aliases in
libpod/define/containerstate.go:"dead"→ContainerStateExited(Docker uses "dead" for containers that failed to be removed)"restarting"→ContainerStateStopping(Podman has no dedicated restarting state; stopping is the closest equivalent)How to verify