Conversation
…compat path supplied (#1919) podup wrote every request line in absolute form (`POST http://localhost/v5.0.0/libpod/...`). Podman's `IsLibpodRequest` checks `strings.Split(r.URL.String(), "/")[2] == "libpod"`, which is `localhost` for that form, so every shared handler treated podup as a Docker client even on `/libpod/` paths. This switches `build_request` to origin form and compensates, endpoint by endpoint, everything the Docker-compatible path had been supplying implicitly, so podup behaves as it did in 5.10.0. What changed on the wire, read from Podman v5.7.0's handlers: | endpoint | what the compat path did | what podup sends now | |---|---|---| | `stop` | honoured `t` | `timeout` (libpod ignores `t`, so `podup stop -t N` would have been ignored) | | `restart` | honoured `t` | `timeout` (libpod treats a missing `timeout` as 0, an immediate kill) | | remove container | `v` removed anonymous volumes | `volumes` | | `kill` SIGKILL / 0 | waited until the container exited | a follow-up `wait` for exited/stopped | | archive PUT (`cp`) | `copyUIDGID` defaulted to false | `copyUIDGID=false` | | `top` | `ps_args` defaulted to `-ef` | `ps_args=-ef` | | `logs` | no multiplexing header for a TTY container | every `/logs` body parsed as multiplexed | | `events` | `died` rewritten to `die` (with `exitCode` copied), image `remove` to `delete` | the same two rewrites, done in podup | | `build` | `layers` forced to true, Docker manifest format, tags normalised to Docker Hub | `layers=true`, `outputformat` Docker v2, tags normalised the same way on the wire (the printed row keeps the short tag) | How I checked it did not regress: - The full live suite, one run at a time: 235 of 235 on Podman 5.7.0. - One live test per compensation. Removing each compensation on its own fails its test, except `kill`: SIGKILL lands in milliseconds, so the state is `exited` with or without the wait; a wire-shape unit test pins the follow-up call instead. - The 5.10.0 binary and this branch's binary ran the same 26 commands on the same compose file (build twice, up, ps, ps json, top, logs with a TTY service, exec, cp and the copied file's owner, port, images, the image's manifest type and HEALTHCHECK, pause/unpause, stop and restart timings, kill, events before and after `down`, `down -v` and the anonymous volume). That comparison found four regressions the tests had missed (TTY log bytes, built image names, the build row's printed name, `events` attributes), all fixed here. What still differs is the order of the build's `LABEL` pairs (it came from a `HashMap` before and is now fixed) and two `Successfully built/tagged` lines the compat handler added to the build's stderr. What does change on purpose: a short image name in a Containerfile's `FROM` is now resolved through `registries.conf`, as `podman build` and podup's own pulls already do, instead of being forced to Docker Hub. An ambiguous short name under Podman's enforcing short-name mode can now fail where it did not. Not measured: Windows (named pipe) and macOS (`podman machine`) against a real Podman. The request target is built the same way on every transport. Closes #1914 Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com> --------- Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Bumps `Cargo.toml`, `Cargo.lock` and `debian/changelog` to 5.10.1 together. Patch release carrying only #1919 (libpod origin-form requests with the compat behaviour kept explicitly), shipped on its own so anything it changes can be traced to it. Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com> Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
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.
Release 5.10.1: libpod origin-form requests with the compat behaviour kept explicitly (#1919).
Signed-off-by: Jaro-c 75870284+Jaro-c@users.noreply.github.com