#2591·EasyTier

[bug] Silent mesh-wide connection churn and route flapping when two physical nodes share the same instance_id — no detection, no warning

Author: amchen2310Created Sep 19, 2026Updated Sep 19, 2026

Brief Description

Two physically different machines were configured with the same instance_id UUID (config was copy-pasted between nodes). The mesh interpreted this as the "same node" appearing from two locations, causing:

  • network-wide route flapping on all relay nodes
  • rapid connection churn on relays (new peer connection added → peer connection removed → connecting to peer, repeating every few seconds from the same source IPs)
  • heavy packet loss between most peers, perceived as a "network storm"
  • the CLI peer table on each affected node still showed p2p 0% loss for peers that were actually unreachable from other nodes (control plane alive / data plane degraded)

We confirmed the root cause by auditing instance_id across all node configs — two nodes shared the same UUID. Regenerating a fresh UUID on one node and restarting immediately stopped the churn on all relays.

What we are asking for is not a behavior change in identity semantics, but detection and observability:

  1. Detection: when a peer manager receives an identity (same instance_id) from a different physical location / peer ID while a previous instance is still alive, this is an abnormal event that currently passes silently.
  2. Warning: log an explicit duplicate instance_id detected warning (with both peer IDs if available), and/or surface it in easytier-cli output.
  3. Optionally: reject or rate-limit the second claim, or at least document that instance_id must be globally unique across machines and must be regenerated when a config is copied to a new host.

This failure mode is invisible today: nothing in the logs points at the duplicated identity, and the symptom (mesh-wide churn) looks like a generic connectivity problem, so users will chase NAT/relay/network issues for hours before finding a one-line config error.

Environment Information

  • easytier-core 2.6.4 (also present on current main as of 2.7.0 / commit 0f3d8e4 — no duplicate-identity check found in easytier/src/peers/)

Node Configurations

Mesh: 9 nodes total — 5 on a home LAN behind one NAT (A, B, C, D, E; mixed GUI / config-file / systemd), 4 public cloud relays (F, G, H, I) formerly managed via docker-compose (unpinned identity), now systemd. TCP/WS listeners, ~11000-range RPC portal, virtual subnet 10.x.x.x/24.

Fault reproduction (sanitized):

  • Node A: instance_id = <UUID-X> (config file)
  • Node B: instance_id = <UUID-X> (same UUID, config copy-pasted from A)
  • Result within seconds: relay F log shows A and B alternating connection added/removed every few seconds; other nodes' route tables to A/B flap; ping loss between unrelated node pairs rises.

Fix applied on our side: instance_id regenerated per node (fresh UUID each), all relays migrated from docker-compose to systemd so identity is stable across restarts. Churn never returned after that.

Log Information

From relay F (docker logs, sanitized):

new peer connection added. conn_info: my_peer_id: <relay>, dst_peer_id: <A>, tunnel_type: "tcp", remote_addr: <A_pub>
peer connection removed. peer_id: <A>
new peer connection added. conn_info: my_peer_id: <relay>, dst_peer_id: <B>, tunnel_type: "tcp", remote_addr: <B_pub>
peer connection removed. peer_id: <B>
connecting to peer. uri: ws://<A_pub>:<port>/
... (repeats every 2-10 s, indefinitely)

No log line anywhere mentions identity conflict, duplicate instance, or UUID collision.