v0.41.2: fix controller-route auto-connect + dead dashboard cross-drive block
containerOnNetwork misread the absent-key '<nil>' as "already attached", so wireController skipped docker network connect -> traefik 502'd felhom.<domain>. Now lists network names and matches exactly. Also removed dashboard.html's dead CrossDrive* block (slice-8C leftover) that 500'd the dashboard via gt <nil> 0, exposed once v0.41.1 made the dashboard reachable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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 "<nil>" (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 != "<no value>"
|
||||
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;
|
||||
|
||||
@@ -127,24 +127,9 @@
|
||||
<span class="backup-value">{{len .DBDumpStatus.Results}} mentve</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if gt .CrossDriveTotal 0}}
|
||||
<div class="backup-info-row">
|
||||
<span class="backup-label">2. mentés:</span>
|
||||
<span class="backup-value">
|
||||
{{if eq .CrossDriveConfigured 0}}
|
||||
<span style="color:var(--yellow)">⚠ Nincs beállítva</span>
|
||||
{{else}}
|
||||
<span class="{{if gt .CrossDriveFailed 0}}backup-status-fail{{else}}backup-status-ok{{end}}">{{.CrossDriveConfigured}} / {{.CrossDriveTotal}} alk.</span>
|
||||
{{end}}
|
||||
</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if gt .CrossDriveFailed 0}}
|
||||
<div class="backup-info-row">
|
||||
<span class="backup-label" style="color:var(--red)">Figyelmeztetés:</span>
|
||||
<span class="backup-value backup-status-fail">⚠ {{.CrossDriveFailed}} 2. mentés sikertelen</span>
|
||||
</div>
|
||||
{{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 <nil> 0). Removed in v0.41.2. */}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user