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.
This commit is contained in:
parent
5bac91a664
commit
62a9f40cc7
1 changed files with 7 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue