Skip to content
SHC Docs

Layer 8. Node

Layer 8. Node. Layer page.

A node does not render. It materialises its own clusterfs from the store and starts replicas from the stored spec.

ce modules/clusterfs/materialiser.go builds a revision from the control-plane store, swaps the current symlink, and is the only writer of that tree. Consumers read through current/.

ce modules/app/stored_render.go says the node’s runner starts replicas from the stored spec. Nothing in FinishStoredRender reads the app or runs Jinja. A spec with no stored render is X404143RNDNOF.

The node row’s location is Location (ce modules/node/models.go).

The node agent starts nothing before its gate opens and nothing after it closes (ce modules/nodeagent/agent.go, Apply). Once this boot’s lease is confirmed it reads the deployments assigned here, prunes, and converges them one at a time through the runner (ce modules/pods/runner.go, Prune and ApplyDeployment).

flowchart TD
M["the materialiser builds a clusterfs revision from the store and swaps current"] --> G{"node agent: this boot's lease confirmed and an apply owed"}
G -->|no| W[wait]
G -->|yes| A["read the deployments assigned here"]
A --> P["Prune: a project whose replica the store no longer binds here goes down, and so do the networks and scratch volumes no replica names"]
P --> D["each assigned deployment"]
D --> L{"lease live and the writer guard admits it"}
L -->|no| R["refused; nothing of it starts"]
L -->|yes| V{"every replica directory's document digests to its record"}
V -->|no| K["the refused one is skipped, and nothing of the deployment is taken down or removed"]
V -->|yes| C{"the replica's containers are the ones its document creates"}
K --> C
C -->|yes| N["left alone: a stopped container is the restart supervisor's or the operator's"]
C -->|no| O{"it comes after a pod not yet in the state it asks for"}
O -->|yes| T["wait, up to the settle time"]
O -->|no| U["make its networks and volumes and bring its replica project up"]

While a replica directory is refused, Prune does nothing at all and ApplyDeployment takes nothing down for having no directory; a damaged file is no reason to stop what it described.