mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-20 18:55:40 +00:00
926906b134
The Proxmox-side LXC Docker inventory poll occasionally produces an ok=true report with zero CONTAINER lines but a valid PS_OK marker: docker ps -a inside the LXC genuinely returned an empty list for that one call, typically while watchtower is briefly recreating a container or the dockerd is mid-restart. ApplyDockerReport then wipes the host's container list, every connected WebSocket client sees every row for that host flash blank, and the next successful poll 10 s later restores it. Before calling ApplyDockerReport, check whether the host already has containers tracked in state. If yes and the new report has zero containers, log at debug and skip the apply, counting the poll as skipped rather than collected. A host that is genuinely empty still applies on first sight (no previous containers means no previous state to protect). Add regression tests for both branches: a populated host receiving an empty report keeps its container list; a freshly-seen empty host still gets created.