Support pod clone for remote clients #30403
Please only call With* when the value is actually set (non-empty / true). Always sending empties/false works today mostly by accident via FillOutSpecGen, but it’s fragile (same footgun as wiping fields like GPUs).
Prefer returning entities.IDResponse{ID: report.Id} so this matches swagger/ pod create/container clone.
LGTM
PTAL @podman-container-tools/podman-reviewers @podman-container-tools/podman-maintainers
Weird that we didn't support this already, I didn't realize we had gaps like this. Might be worth pointing an LLM at this to fuzz what commands are missing from remote and verify they all have a valid reason.
Can we share this with PodCloneEntitites? Would simplify things a bit if we could - no copying from one to the other when we do the REST API operation?
Good point, I've merged them: pods.CloneOptions now carries the JSON tags and the handler decodes into it directly, so PodCloneEntities is gone (the swagger model keeps the same name). Container clone from #30049 still has the two separate types, so it may need a follow-up to match this pattern.
@mheon
Do we still need this? Could just pass podClone over the network, no?
Should probably accept a *entities.PodCloneOptions
From my understanding PodCloneOptions is filled with defaults from the client's containers.conf (volumes, ulimits, timezone…), which would then be applied on the server.
Its fields are also plain values, so the server can't tell unset from empty. That's why the handler builds the defaults on the server side, same as container clone in #30049.
Honny1
axel7083
Fixes https://github.com/podman-container-tools/podman/issues/29975
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
<!-- Use [x] to mark as done, or click the checkbox after opening PR -->
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. Read the DCO Sign-off requirements
and ensure you follow them before signing off your commits.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
Following https://github.com/podman-container-tools/podman/pull/30049 (
podman container clone) adding the second (and last) part:podman pod clone.:new: the good news: The pod clone e2e tests now also run against remote
``
release-note
``Support podman pod clone on remote target
disclose: I used AI to help me implement the fix