Skip to content

charly remove silently drops the published host port (service comes back on a random port) #989

Closed

Description

@aitrawog

What

charly remove discards the deployment's resolved_port (and its env), so re-adding the deployment silently comes up on a different, random host port — and the already-running container keeps its old binding even after the unit file is corrected.

Measured (host a, charly 2026.293.0716, podman 6.1.3)

Deployment was serving on 127.0.0.1:36201 (resolved_port: 36201:8080).

$ charly remove strata -i sc117
$ charly config strata -i sc117 --tag … -c -e MODEL=ORCA_IQ3_XXS -e CONTEXT=32768 \
    -v "strata-data:bind:/home/atrawog/.local/share/strata"
$ charly start strata -i sc117
# -> no host port restored
$ podman port charly-strata-sc117
8080/tcp -> 127.0.0.1:45635      # a random port, not 36201

Correcting the unit does not fix the running container:

$ grep PublishPort ~/.config/containers/systemd/charly-strata-sc117.container
PublishPort=127.0.0.1:36201:8080   # unit is correct
$ podman port charly-strata-sc117
8080/tcp -> 127.0.0.1:45635      # running container still on the old binding
# only a full stop + start applies it

An explicit -p 36201:8080 on charly config fixes it, but the operator has no way to know it is needed: the deployment that was serving one second earlier now answers on a port nobody chose.

Impact

Every client, bookmark and reverse proxy pointing at the old port breaks silently — the service is healthy, just somewhere else. Discovered while verifying that a rebuild preserves state (it does preserve /data; it does not preserve the port).

Related

The same call also drops the NVIDIA device set and the deploy env in some orderings (observed earlier in this session), forcing the operator to re-specify everything by hand.

Root fix

remove should either preserve resolved_port/device/env in the deploy entry, or refuse to drop them without an explicit flag — and config/quadlet changes should recreate the container rather than leaving a stale binding visible only via podman port.


Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions