mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-08 09:53:25 +00:00
Root cause: findMatchingDockerHost() was matching hosts by token ID alone, causing multiple Docker agents using the same API token to overwrite each other in state. This resulted in only N visible hosts (where N = number of unique tokens) instead of all M agents, with hosts "rotating" as each agent reported every 10 seconds. Example: 4 agents using 2 tokens would show only 2 hosts, rotating between agents 1↔2 (token A) and agents 3↔4 (token B). Fix: Remove token-only matching from findMatchingDockerHost(). Hosts should only match by: 1. Agent ID (unique per agent) 2. Machine ID + hostname combination (with optional token validation) 3. Machine ID or hostname alone (only for tokenless agents) This allows multiple agents to share the same API token without colliding. Additional fix: UpsertDockerHost() now preserves Hidden, PendingUninstall, and Command fields from existing hosts, preventing these flags from being reset to defaults on every agent report. |
||
|---|---|---|
| .. | ||
| alerts | ||
| api | ||
| auth | ||
| config | ||
| crypto | ||
| discovery | ||
| dockeragent | ||
| errors | ||
| hostagent | ||
| hostmetrics | ||
| logging | ||
| metrics | ||
| mock | ||
| models | ||
| monitoring | ||
| notifications | ||
| ssh/knownhosts | ||
| system | ||
| tempproxy | ||
| types | ||
| updates | ||
| utils | ||
| websocket | ||