From 62a9f40cc7275c0f309b8bcee3a40e18f217a57f Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sun, 9 Nov 2025 16:49:49 +0000 Subject: [PATCH] Fix diagnostics incorrectly warning about /run mount in Docker (related to #600) The diagnostic code was warning ALL deployments using /run/pulse-sensor-proxy socket path to "remove and re-add" their configuration to use /mnt/pulse-proxy instead. This was incorrect for Docker deployments where /run is the correct and documented mount path (see docker-compose.yml line 15). The warning was only meant for LXC containers where the managed mount at /mnt/pulse-proxy is preferred over a legacy hand-crafted /run mount. Fix: Only show the warning in non-Docker environments (check PULSE_DOCKER env). Docker deployments correctly use /run/pulse-sensor-proxy per compose file. Impact: Docker users were seeing confusing diagnostic warnings telling them to reconfigure a correct setup. --- internal/api/diagnostics.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/api/diagnostics.go b/internal/api/diagnostics.go index 4111014..d5e295b 100644 --- a/internal/api/diagnostics.go +++ b/internal/api/diagnostics.go @@ -693,7 +693,13 @@ func buildTemperatureProxyDiagnostic(cfg *config.Config) *TemperatureProxyDiagno if !diag.SocketFound { appendNote("No proxy socket detected inside the container. Remove the affected node in Pulse, then re-add it using the installer script from Settings → Nodes to regenerate the mount (or rerun the host installer script if you prefer).") } else if diag.SocketPath == "/run/pulse-sensor-proxy/pulse-sensor-proxy.sock" { - appendNote("Proxy socket is exposed via /run. Remove and re-add this node with the Settings → Nodes installer script so the managed /mnt/pulse-proxy mount is applied (advanced: rerun the host installer script).") + // Only warn about /run mount in LXC containers where /mnt/pulse-proxy is preferred + // Docker deployments correctly use /run/pulse-sensor-proxy per docker-compose.yml + isDocker := os.Getenv("PULSE_DOCKER") == "true" + if !isDocker { + // In LXC, /run mount indicates legacy hand-crafted mount instead of managed mount + appendNote("Proxy socket is exposed via /run. Remove and re-add this node with the Settings → Nodes installer script so the managed /mnt/pulse-proxy mount is applied (advanced: rerun the host installer script).") + } } client := tempproxy.NewClient()