install: run again, it keeps the options it isn't given (#84) #85

Merged
jcoffey-dev merged 2 commits from fix/84-install-reuses-record into main 2026-11-18 17:03:01 +00:00
Owner

Fixes #84.

  • Every option not on the command line or in --answers is taken from the install: the shapes (a component it doesn't have stays skipped), proxy, names, dir, ACME contact and CA. The plan lists what it took.
  • The record gains proxy, consoleHost, webmailHost and the ACME settings. For installs from before this, the proxy is read from the deployment's files, and the front ends' names from the INBUXA_ADMIN_URL / INBUXA_WEBMAIL_URL the server is given.
  • Front ends joined to a server elsewhere inherit nothing.
  • Also fixes a bug on main: a re-run that changed the Caddyfile never reloaded Caddy (compose doesn't recreate a container for a changed bind-mounted file). New names, or a front end added or taken off, left Caddy serving and certifying the old ones. A converge that changed it now runs caddy reload, and restarts Caddy if that fails. The rename e2e case found it.
  • Behavior change, in the README: putting a skipped component back now needs its flag (--webmail container).

Checked in the lab (debian13) with the three fixes together: the new e2e/cases/rename.sh 25/25 (install on lab.test, rename to names on other.test, dns, certs, hostname change, dns --refresh), and the existing certs.sh 21/21 and move-server.sh 56/56. Locally: gofmt, go vet (amd64 and arm64), go test -count=1 ./.... govulncheck only flags this workstation's Go 1.27.3 standard library (GO-2026-6859); CI's Go 1.26.11 has the fix.

Fixes #84. - Every option not on the command line or in `--answers` is taken from the install: the shapes (a component it doesn't have stays skipped), proxy, names, dir, ACME contact and CA. The plan lists what it took. - The record gains `proxy`, `consoleHost`, `webmailHost` and the ACME settings. For installs from before this, the proxy is read from the deployment's files, and the front ends' names from the `INBUXA_ADMIN_URL` / `INBUXA_WEBMAIL_URL` the server is given. - Front ends joined to a server elsewhere inherit nothing. - **Also fixes a bug on main:** a re-run that changed the Caddyfile never reloaded Caddy (compose doesn't recreate a container for a changed bind-mounted file). New names, or a front end added or taken off, left Caddy serving and certifying the old ones. A converge that changed it now runs `caddy reload`, and restarts Caddy if that fails. The rename e2e case found it. - Behavior change, in the README: putting a skipped component back now needs its flag (`--webmail container`). Checked in the lab (debian13) with the three fixes together: the new `e2e/cases/rename.sh` 25/25 (install on lab.test, rename to names on other.test, `dns`, `certs`, hostname change, `dns --refresh`), and the existing `certs.sh` 21/21 and `move-server.sh` 56/56. Locally: gofmt, `go vet` (amd64 and arm64), `go test -count=1 ./...`. govulncheck only flags this workstation's Go 1.27.3 standard library (GO-2026-6859); CI's Go 1.26.11 has the fix.
jcoffey-dev added 2 commits 2026-11-18 17:00:07 +00:00
Running install on a machine with an install recorded started from the
defaults, so an option left out changed the install: a missing --server
host asked for a move, a missing --proxy snippets swapped in Caddy, and
renaming meant repeating every option from the first run.

Now every option not on the command line or in --answers is taken from
the install: shapes (a component it doesn't have stays skipped), proxy,
names, dir, ACME contact and CA. The record gains the proxy, the front
ends' names and the ACME settings; for installs from before it, the proxy
is read from the deployment's files and the front ends' names from the
addresses the server is given (INBUXA_ADMIN_URL / INBUXA_WEBMAIL_URL).
The plan lists what it took. Front ends joined to a server elsewhere
inherit nothing.
compose.Write rewrites the Caddyfile on every run, but Caddy reads it only
at start, and a changed bind-mounted file doesn't make compose recreate
the container. So a re-run with new names, or with a front end added or
taken off, left Caddy serving and certifying the old ones: after a rename
the new console name didn't answer and the new mail host's HTTP-01
challenge was redirected instead of reaching the server (found by the
rename e2e case). A converge that changed the Caddyfile now runs caddy
reload, and restarts Caddy if the reload doesn't take.
jcoffey-dev self-assigned this 2026-11-18 17:00:28 +00:00
jcoffey-dev merged commit 03c619d1b4 into main 2026-11-18 17:03:01 +00:00
jcoffey-dev deleted branch fix/84-install-reuses-record 2026-11-18 17:03:01 +00:00
Sign in to join this conversation.