Skip to main content

Module diag

Module diag 

Source
Expand description

Node-level conditions that are observable but have no API to observe them through (#134) — currently the relay’s duplicate-endpoint-id report, which iroh 1.0.3 only warn!s. Node-level conditions that are observable but have no API to observe them through (#134).

The duplicate-identity condition. Two nodes booted from COPIES of one mesh root present the same endpoint id. The relay notices — it can only serve one — and tells the displaced client Status::SameEndpointIdConnected. From the node’s own point of view its peers simply stop being reachable, with nothing saying why; diagnosing it cost a downstream real time.

The local guards cannot see it: a second node on the SAME root is stopped by the redb lock, but a node on a COPY is a different file, at a different path, possibly on another machine. The only party that observes the collision is the network layer.

iroh 1.0.3 offers no API for it. The signal arrives, and socket/transports/relay/actor.rs handles it with warn!("Relay server reports problem: {status}") — no event, no Endpoint state, no watcher. A tracing event is the only channel there is.

So this is a Layer, not a subscriber. A tracing subscriber is global and an embedded mcpmesh-node does not own it — the host application does. Installing our own would either fail or fight theirs. [IdentityConflictLayer] is composed into whatever subscriber the host already runs; the standalone daemon installs it itself at boot.

On matching a log message. It is brittle by nature, so the needle is not written down here: it is built from [Status::SameEndpointIdConnected]’s own Display, the same value iroh formats into that warn!. An upstream rewording changes both sides together, and the test that pins the two against each other fails if the shape of the coupling changes rather than the wording.

Structs§

IdentityConflict
The observed duplicate-identity condition (#134): when the relay last told us another endpoint is presenting our identity.
IdentityConflictLayer
A tracing layer that watches for the relay’s duplicate-identity report and records it.

Functions§

install_for_daemon
Install IdentityConflictLayer as the process-global subscriber. Standalone daemon only.