-
fix(hosts): a node showed itself twice — fold the stale copy of its own machine back into id=1
Release / version (push) Canceled after 0sRelease / frontend (push) Canceled after 0sRelease / linux (amd64) (push) Canceled after 0sRelease / linux (arm64) (push) Canceled after 0sRelease / windows (push) Canceled after 0sRelease / macos (push) Canceled after 0sRelease / release (push) Canceled after 0sBuild and Push Docker Image / build-and-push (push) Canceled after 0sreleased this
2026-09-13 19:33:00 +03:00 | 56 commits to main since this releaseAfter the previous fix the cluster agreed on one row per machine, but the moved
machine's OWN dashboard still carried a second, frozen card for itself. The two
rows were the same machine by SMBIOS UUID, split only by MAC.id=1 is written locally and always carries the MAC the agent has right now. When
the cluster moved that MAC onto its copy of the same machine, the update was
deflected — mac_address is unique and id=1 already held it — so the copy kept the
old MAC AND the external_id. From then on it won every external_id lookup in
UpsertConnectorHost, id=1 never received the topology, and each new connector
poll refreshed the wrong row. Nothing in the flow could ever undo that: the
lookup that picks the wrong row is the same one that would have to fix it.The upsert now recognises a resolved row as a stale copy of this node's own
machine and folds it into id=1, dropping it. The gate is deliberately the
strongest evidence available — the two rows sharing a non-empty stable identity
(SMBIOS UUID or machine-id). Not a MAC: Docker-bridge agents on different
machines derive identical 02:42:… ones, and a mistaken fold here would swallow a
real machine's row. A genuinely remote origin is excluded for the same reason the
cross-site guard above it exists.Also drops a misleading branch from the previous commit. The FSM treated a gap
above its watermark as proof that a snapshot had been installed and
fast-forwarded past it, logging so on a live cluster every few minutes: raft
keeps configuration and no-op entries out of the FSM entirely, so the indexes it
hands us legitimately skip. The watermark never needed to be contiguous with the
log — a restore realigns it explicitly — and the claim it printed was simply
untrue.Verified against the three real nodes: the leader and the LXC had already
converged to one row per machine after v0.11.1, with live watermarks; the NAS
still held id=1 (MAC …:00:02, no topology) and a copy on …:00:03 holding
external_id …/qemu/101, both carrying UUID 4b23b4fd — exactly the split this
folds. Covered by tests for both the fold and the two-machines-must-stay-apart
case.Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Downloads