Detecting a control plane link break¶
The two sides detect a break differently and at different speeds. The node detects on its next call; the control plane detects by absence. This page is both, and what each side does with the finding.
From the node¶
A failed call is classified before it is retried. The node marks the transport degraded for that operation, recording the error, the attempt, the backoff it will wait, and the moment it will try again:
mode degraded_cp_unreachable
reason degraded_cp_unreachable
last_operation which call failed
consecutive_failures how many in a row
last_error, last_error_epoch what and when
last_retry_backoff_seconds how long it is waiting
retry_at_epoch when the next attempt is due
degraded_since_epoch when the outage started
The transition into degraded is logged once, on the edge:
Subsequent failures raise consecutive_failures and move retry_at_epoch
without logging again, so a long outage produces one transition record rather
than a stream of identical lines.
Three kinds of failure, told apart¶
| The node sees | It concludes | It does |
|---|---|---|
| A transport failure | The control plane is unreachable | Marks degraded, backs off, retries |
| A version incompatibility | This node cannot speak to this control plane | Suppresses intake, reports PROTOCOL_VERSION_INCOMPATIBLE |
| Its registration is unknown | Its identity is no longer recognised | Clears registration and registers again |
Only the first is a link break. The second is a version problem that retrying will never fix, and the third is a state problem the node resolves by re-establishing rather than retrying.
From the control plane¶
flowchart LR
N["xratud<br/>unreachable"]
subgraph CP["CONTROL PLANE"]
direction TB
HB[("Heartbeat rollup<br/>goes stale")]
LED[("Assignment ledger<br/>leases lapse at 30 s")]
LC["Lease controller<br/>controller phase"]
Q[("Available to another node")]
LC -->|"reads"| LED
LC -->|"requeues"| Q
end
N -. "heartbeats stop" .-> HB
N -. "renewals stop" .-> LED
Two records go quiet, and only one of them has a controller reading it. A stale heartbeat changes what the control plane believes about the node, and the lease controller acts on a lapsed lease.
Heartbeat absence and lease expiry are separate signals with separate consequences. Absence makes the control plane's view of the node stale. Expiry makes the node's work available again.
The controller reports what it requeued each cycle, so the rate is observable:
A rising count with nothing else changing is nodes losing leases faster than they renew them, which is the signature of a link that is flapping rather than one that is cleanly down.
Flapping is visible¶
The node's transport state counts transitions. A link that oscillates raises
transition_count while degraded_since_epoch keeps resetting; a link that is
steadily down has a low transition count and a growing outage.
Telling the two apart matters, because a flapping link produces repeated lease loss and reclamation while a steady outage produces one clean handover.
See Assignments and leases during a break for what happens to the work, and Recovering the control plane link for the way back.