Pulse/internal/models
rcourtman 7ee252bd84 Fix Docker host display bug when multiple agents share API tokens (related to #658)
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.
2025-11-07 13:46:35 +00:00
..
cluster.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
concurrency_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
converters.go Add per-node temperature monitoring and fix critical config update bug 2025-11-05 14:11:53 +00:00
models.go Fix Docker host display bug when multiple agents share API tokens (related to #658) 2025-11-07 13:46:35 +00:00
models_frontend.go Add per-node temperature monitoring and fix critical config update bug 2025-11-05 14:11:53 +00:00
state_snapshot.go Add per-node temperature monitoring and fix critical config update bug 2025-11-05 14:11:53 +00:00