Manage an enrollment over its life¶
What you will end up with¶
The ability to read a node's enrollment state, rotate its runtime identity, drain and resume its work, and revoke or retire it when it leaves.
Prerequisites¶
- An enrolled node.
- A shell on that node. The lifecycle commands read the node's bootstrap
seed from
/var/lib/xratu/identityto discover which node they act on, so they run on the node and take no arguments.
A node whose seed is missing any of control_plane_base_url, actor_id,
auth_token, dataplane_uuid, dataplane_instance_uuid or enrollment_uuid
cannot resolve its own identity, and that is what a failure here means. See
Identity continuity.
1. Read the current state¶
The report combines the node's runtime identity state with its lease state and projects an enrollment state from the two:
| Runtime identity state | Lease state | Reported enrollment |
|---|---|---|
healthy |
any | active |
degraded_revocation_freshness_unknown |
any | active |
quarantined |
any | revoked |
| anything else | ready, warming or active |
active |
| anything else | stale |
unknown |
A stale lease state means the heartbeat is no longer fresh, so unknown here
usually points at connectivity rather than at the enrollment record.
2. Rotate the runtime identity¶
Runtime credentials are short-lived and refresh on their own. Rotate explicitly when you want a new credential now, for example after a suspected exposure:
This issues a fresh runtime credential bound to the current instance. The
enrollment, the dataplane_uuid and the node label are untouched.
3. Drain and resume¶
Before maintenance, stop the node taking new work while letting current work finish:
Return it to service:
Drain records DECOMMISSION_DRAIN_REQUESTED; resume records
BREAK_GLASS_FORCE_RESYNC. Confirm with xratu dataplane status between the
two.
4. Re-enrol after a restart¶
Nothing to do. A node whose durable volume survived comes back with the same
installation identity, exchanges again, and the control plane reuses its
dataplane_uuid and enrollment_uuid. The audit record marks it
idempotent_identity_reuse.
A node rebuilt from empty storage is a new installation. If it will reuse the
old node label, retire the previous enrollment first, or the exchange is refused
with 409 DATAPLANE_ENROLLMENT_NODE_LABEL_CONFLICT. See
Re-enrollment and idempotency.
5. Revoke¶
Withdraw the node's runtime identity while leaving the enrollment record in place:
Recorded as BREAK_GLASS_FORCE_REVOKE. The enrollment moves to revoked, and
from there the only onward transition is retired.
Use revoke when a node must stop being admitted immediately and you have yet to decide whether it is coming back.
6. Retire¶
Close the enrollment and decommission the node:
Recorded as DECOMMISSION_HARD_STOP. The enrollment moves to retired, which
releases its node label for reuse. A retired enrollment can be tombstoned, and
the record is kept for audit either way.
Retire is the step that makes a replacement clean: retire the old enrollment, mint an invitation for the replacement, and let it enrol as a new node keeping the familiar label.
The transitions you can make¶
stateDiagram-v2
[*] --> pending
pending --> active
pending --> revoked
pending --> retired
active --> revoked
active --> retired
revoked --> retired
retired --> tombstoned
Anything outside this set is refused:
There is one direction of travel. Bringing a retired node back is a fresh enrollment with a fresh invitation.
If it fails¶
| Symptom | Cause | Fix |
|---|---|---|
| Cannot resolve identity from the seed | The seed is absent or incomplete | Confirm the durable volume is mounted at /var/lib/xratu/identity |
status reports unknown |
The heartbeat is stale | Check the node's outbound reachability to the control plane |
409 DATAPLANE_ENROLLMENT_ILLEGAL_TRANSITION |
The requested move is outside the closed set | Read the current state first with xratu dataplane status |
409 DATAPLANE_ENROLLMENT_NODE_LABEL_CONFLICT |
A rebuilt node is reusing a live label | Retire the previous enrollment, then enrol the replacement |
| Runtime registration refused on policy revision | The organization's tenancy policy values changed | The credential predates them; rotate after reconciling |
What changed¶
| Operation | Effect |
|---|---|
rotate |
New runtime credential, same enrollment and identity |
drain |
Node stops accepting new assignments |
resume |
Node resumes accepting assignments |
revoke |
Runtime identity withdrawn, enrollment revoked |
retire |
Enrollment closed, node label released |
Next¶
Verifying and troubleshooting day 0 for reading a node that will not enrol at all.