Repository navigation
Description
What happens
A port pin supplied on the very command that first configures a deploy is silently lost:
$ charly -C distro-fedora config openwebui -i lab -p 18080:8080
Wrote /home/atrawog/.config/containers/systemd/charly-openwebui-lab.container
$ grep PublishPort ~/.config/containers/systemd/charly-openwebui-lab.container
PublishPort=127.0.0.1:8080:8080 # ← the host port is the auto-allocation, not 18080
The entry DOES record the pin (port: ["18080:8080"]), and re-running the same command honours it:
$ charly -C distro-fedora config openwebui -i lab -p 18080:8080
$ grep PublishPort ~/.config/containers/systemd/charly-openwebui-lab.container
PublishPort=127.0.0.1:18080:8080 # ← correct only on the SECOND run
So the defect is first-run only: a fresh config -p H:C publishes an auto-allocated host port.
Mechanism
plugin-deploy-pod/candy/plugin-deploy-pod/config_setup.go runs port resolution BEFORE the CLI overrides:
resolveDeployPorts(ctx, ex, &dc, key, &meta)— computesResolvedPortfrom the IMAGE label's
container ports plus the entry'sport:pins, all throughkit.ResolveDeployPorts
(sdk/kit/ports.go:350honours a pin for its container port);deploykit.MergeDeployOntoMetadata(&meta, dc, …)→ports := meta.Port;if len(c.Port) > 0 { ports, portErr = kit.ApplyPortOverrides(ports, c.Port) }— the CLI pins are
applied LAST, toports.
On a first run the entry has no pins yet, so step 1 auto-allocates and persists resolved_port; the
quadlet publishes ResolvedPort, so the override applied in step 3 never reaches the artifact. On a
second run the pin is already in the entry, step 1 honours it, and everything agrees — which is exactly why
the bug hides from a re-run.
Root fix
The resolver's input must include the operator's pins: pass c.Port into resolveDeployPorts and merge
them with the entry's pins (CLI last, matching ApplyPortOverrides precedence) so the FIRST resolution
already lands the operator's host port. resolved_port then equals the pin and the quadlet agrees with the
entry on run one.
Blast radius
Every fresh charly config <image> -p H:C on a pod substrate: the pin is accepted, printed as accepted, and
not applied — and the failure mode is silent, because the deploy starts fine on the auto-allocated port.
Anyone pinning a port for a reverse proxy, a tunnel, or a second instance of one image gets a different port
than they asked for on the first attempt.
Evidence
Measured 2026-11-14 on the Open WebUI lab deploy: first config → 8080:8080; re-run of the identical
command → 18080:8080, with the entry's port: unchanged between the two runs.
Agent: charly (lead)
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
Activity
aitrawog commentedon Nov 15, 2026
RESOLVED by plugin-deploy-pod#53 — the operator's
-ppins reach port resolution, so the FIRST config honours the pin (proven on a disposable target)Agent: charly (lead)
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)