diff --git a/CHANGELOG.md b/CHANGELOG.md index f5487b0..621a016 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ ## Changelog +### v0.41.2 — fix controller-route auto-connect + dead dashboard cross-drive block (2026-06-11) + +Two fixes found while live-validating v0.41.1 routing on guest 9201: +- **`containerOnNetwork` false-positive (v0.41.1 regression):** the membership check used + `{{index .NetworkSettings.Networks "traefik-public"}}`, whose output for an absent key is `` + (non-empty) — so `wireController` thought the controller was already attached and **skipped the + `docker network connect`**. traefik then matched the route but 502'd (backend unresolvable). Fixed by + listing the network names and matching exactly. Live: `felhom.` now reaches the controller. +- **Dead cross-drive dashboard block (pre-existing, slice-8C leftover):** `dashboard.html` still + referenced `.CrossDriveTotal/.CrossDriveConfigured/.CrossDriveFailed`, which the de-privileged + dashboard handler stopped providing — so `gt 0` **500'd the entire dashboard**. Only surfaced + now because v0.41.1 finally made the dashboard reachable. Removed the dead block (cross-drive backup + is the host agent's job since 8C). + ### v0.41.1 — wire the controller dashboard into traefik (`felhom.` routing) (2026-06-11) Completes v0.41.0: the base-infra bring-up stood up traefik/cloudflared/filebrowser but nothing routed diff --git a/controller/internal/stacks/infra.go b/controller/internal/stacks/infra.go index d1cd90a..8df00d5 100644 --- a/controller/internal/stacks/infra.go +++ b/controller/internal/stacks/infra.go @@ -188,14 +188,20 @@ func (m *Manager) wireController(traefikDir string) error { } // containerOnNetwork reports whether the named container is attached to the given docker network. +// We list the network names and match exactly — NOT `{{index .Networks "name"}}`, whose output for an +// absent key is "" (a non-empty string), which would falsely read as "already attached". func containerOnNetwork(name, network string) bool { out, err := exec.Command("docker", "inspect", "--format", - fmt.Sprintf("{{index .NetworkSettings.Networks %q}}", network), name).Output() + "{{range $k, $_ := .NetworkSettings.Networks}}{{$k}}\n{{end}}", name).Output() if err != nil { return false } - s := strings.TrimSpace(string(out)) - return s != "" && s != "" + for _, n := range strings.Fields(string(out)) { + if n == network { + return true + } + } + return false } // ensureTraefikNetwork creates the external traefik-public docker network if absent (idempotent; diff --git a/controller/internal/web/templates/dashboard.html b/controller/internal/web/templates/dashboard.html index 2670732..5b40e88 100644 --- a/controller/internal/web/templates/dashboard.html +++ b/controller/internal/web/templates/dashboard.html @@ -127,24 +127,9 @@ {{len .DBDumpStatus.Results}} mentve {{end}} - {{if gt .CrossDriveTotal 0}} -
- 2. mentés: - - {{if eq .CrossDriveConfigured 0}} - ⚠ Nincs beállítva - {{else}} - {{.CrossDriveConfigured}} / {{.CrossDriveTotal}} alk. - {{end}} - -
- {{end}} - {{if gt .CrossDriveFailed 0}} -
- Figyelmeztetés: - ⚠ {{.CrossDriveFailed}} 2. mentés sikertelen -
- {{end}} + {{/* Cross-drive ("2. mentés") moved to the host agent in slice 8C — the dashboard handler no + longer provides CrossDrive* fields, so the old block was a dead reference that 500'd the + dashboard (gt 0). Removed in v0.41.2. */}} {{end}}