Lifecycle actions are how you change a node’s runtime state without changing its configuration. Each action edits the spec’sDocumentation Index
Fetch the complete documentation index at: https://docs.novacula.io/llms.txt
Use this file to discover all available pages before exploring further.
desiredState field; the executor reconciles to it on its next tick. There is no out-of-band “kill the process” — every transition flows through the same desired-state path.
Actions
| Action | Sets desiredState to | Other effects |
|---|---|---|
| Start | running | Creates a new revision; executor starts the underlying processes. |
| Stop | stopped | Creates a new revision; executor stops the processes (and removes pods on Operator). Volumes/data preserved. |
| Restart | running (already) | Bumps restartGeneration. Executor sees the bump and re-rolls the processes. |
| Delete | n/a | Hard-removes the node spec; executor tears down processes and (optionally) data. |
What happens behind the scenes
Every action calls therequestNodeLifecycleAction mutation, which:
- Writes a new
Node.specrevision with the requesteddesiredState(and an incrementedrestartGenerationfor restart). - Records a
node.lifecycle.requestedevent in the Events feed attributed to the user who triggered it. - Returns immediately. Nothing has touched the executor yet.
- Sees the new revision.
- The reconciler diffs
desiredvsobservedand acts:- If
running → stopped: stop the systemd unit / scale the StatefulSet to 0. - If
stopped → running: ensure the unit is started / pod is scheduled. - If
restartGenerationbumped: stop then start (or rollout-restart on Operator).
- If
- The reporter loop picks up the new
ObservedNodeStatus(stopping→stopped, etc.) and writes it back viasyncExecutor. - A
node.lifecycle.transitionevent is recorded once observed status crosses the threshold.
Stop semantics
Stop halts the processes but keeps everything else intact:
- Agent —
systemctl stop <unit>. The data directory under<data_dir>/nodes/<name>/is untouched. - Operator — the
BlockchainNodeCR’s status flips toStopping; theStatefulSetscales to 0 replicas. The PVC is retained.
Restart semantics
Restart is a clean stop + start. Use it after editing config (the Edit configuration flow already triggers this implicitly when needed) or to recover a process that’s stuck without changing anything else.
Delete
Deleting a node is the only irreversible action. It:- Calls
deleteNode. The spec row is marked deleted. - Writes a
node.deletedevent. - The executor sees the deletion on its next poll and:
- Agent — stops + removes the systemd units and removes the data directory under
<data_dir>/nodes/<name>/(configurable retention coming). - Operator — deletes the
BlockchainNodeCR. Cascading delete of theStatefulSet,ConfigMap, andService. PVCs are retained by default — Kubernetes default behavior — so re-deploying a node with the same name on the same operator will reuse the prior data, unless you explicitlykubectl delete pvcfirst.
- Agent — stops + removes the systemd units and removes the data directory under
State machine
The platform tracks a derived node phase for the colored status badge in the UI. The phases:| Phase | Meaning |
|---|---|
provisioning | Spec exists; executor hasn’t reported observed state yet. |
configuring | Executor is generating config / installing binaries. |
starting | Process is launching but not yet healthy. |
running | Healthy and accepting peers. |
syncing | Healthy and importing blocks. |
stopping | Stop in progress. |
stopped | desiredState = stopped and observed matches. |
error | One or more processes crashed or failed health checks. |
deleting | Delete in progress; teardown not finished. |
getDerivedNodePhase() in @vos/protocol, computed from desired state, observed status, and revision drift. They are displayed, not written — the executor only ever pushes raw ObservedNodeStatus per process.