Skip to content

compat: ignore dead and restarting status filters - #29366

Open
WasThatRudy wants to merge 1 commit into
podman-container-tools:mainfrom
WasThatRudy:fix-compat-status-filter
Open

compat: ignore dead and restarting status filters#29366
WasThatRudy wants to merge 1 commit into
podman-container-tools:mainfrom
WasThatRudy:fix-compat-status-filter

Conversation

@WasThatRudy

@WasThatRudy WasThatRudy commented Aug 1, 2026

Copy link
Copy Markdown

Summary

docker allows dead and restarting as values for the status filter on the compat /containers/json endpoint, but podman currently returns HTTP 500 when either of them is used. this changes the compat api to ignore those values and return an empty list if no other status filters are left, which matches docker's behavior.

the libpod api still rejects these values since they are docker specific states, as discussed in #28926. the libpod api docs are also updated to list only the states podman supports.

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • I have read and understood our contributing guidelines and will not have more than two open PRs as a new contributor.
  • PR description, commit message, and GitHub comments are human-written, per LLM Policy
  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

Fixed the Docker-compatible `/containers/json` API to accept the `dead` and `restarting` status filters instead of returning an internal server error. (#28904)

Docker documents `dead` and `restarting` as valid values for the
`status` filter on `/containers/json`. Podman returns HTTP 500 when
either of them is used even though no Podman container can ever be in
those states.

Ignore these values in the compat API. If they are the only status
filters, return an empty list like Docker does. Invalid status values
still return an error.

The libpod API still rejects these values since they are Docker
specific. Update the libpod API docs to list the states Podman
actually supports.

Reference:
https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerList

Fixes: podman-container-tools#28904
Signed-off-by: Rudraksha Singh <rudraksharss@gmail.com>
@github-actions github-actions Bot added the kind/api-change Change to remote API; merits scrutiny label Aug 1, 2026
@packit-as-a-service

Copy link
Copy Markdown

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/api-change Change to remote API; merits scrutiny

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant