Skip to content

xratud startup and bootstrap wiring

Startup resolves configuration, brings up the probe surface, and enters the loop. What makes a start a continuation rather than a new node is the seed written at enrollment and read on every start after it.

The node at start

flowchart LR
  subgraph POD["THE NODE'S POD"]
    direction TB
    INIT["Init container<br/>enrollment, once"]
    subgraph XD["XRATUD"]
      direction TB
      CFG["Configuration<br/>bootstrap path"]
      PRB["Probe server"]
      LOOP["Cycle loop"]
      CFG --> PRB --> LOOP
    end
  end
  DISK[("/var/lib/xratu<br/>seed, cursors")]
  CP["Control plane"]
  INIT -->|"writes the seed"| DISK
  DISK -->|"read and validated"| CFG
  INIT -->|"invitation code for seed"| CP
  LOOP -->|"waits for ready, then pulls"| CP

Enrollment and running are two containers, joined only by the seed on disk. The daemon never enrolls: it reads and validates what the init container wrote, and the probe server brackets the loop, so a node answers probes for its entire lifetime including while it drains.

Joining happens before running

Enrollment is a separate step performed before the daemon runs, by an init container that exchanges an invitation code for a seed. The daemon does not enroll; it reads what enrollment left.

The seed carries what the node needs to resume: its identity set, its runtime credential, the invitation's scope, the discovery pin, and its watch revision. See Durable runtime state.

The seed is validated, not assumed

A seed is validated when it is read rather than trusted because the file exists. A node whose seed does not satisfy its contract does not start against it, which keeps a corrupted or partially written seed from producing a node with an ambiguous identity.

Readiness of the other side is waited for, not assumed

Bootstrap can wait for the control plane to become ready, with a timeout and an interval, rather than failing on the first refused connection. A node started alongside a control plane that is still coming up joins when it is available.

That wait is bounded. A node that cannot reach the control plane within its timeout fails rather than waiting indefinitely, so a misconfigured endpoint surfaces as a failed start.

What the node is bound to

Startup binds the node's cursor state to two identities:

dataplane_uuid          which node this cursor belongs to
cp_identity_revision    which control-plane identity it was written under

Binding the cursor to both is what keeps a cursor from being applied under an identity it was not written for. A control plane with a different identity, or a seed belonging to a different node, does not silently continue from this cursor's position.

Configuration comes from the bootstrap path

The daemon's configuration is resolved through its runtime bootstrap capability rather than assembled from the environment at each use. What a node is configured with is therefore resolvable as one document at start.

Behaviour beyond that comes from assignments. See xratud.