Skip to content

feat(enclave): add getLuksProvisioningStatus RPC for first-boot wipe progress#196

Merged
samlaf merged 1 commit into
seismicfrom
enclave/luks-provisioning-status
Jun 30, 2026
Merged

feat(enclave): add getLuksProvisioningStatus RPC for first-boot wipe progress#196
samlaf merged 1 commit into
seismicfrom
enclave/luks-provisioning-status

Conversation

@samlaf

@samlaf samlaf commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

First boot wipes the entire persistent disk to seed dm-integrity tags, which can take 1h+ and is otherwise an opaque, silent wait. Add a read-only RPC so the operator CLI can poll it and render a progress bar.

  • api.rs: LuksProvisioningStatus type (internally tagged by state: idle / provisioning{bytes_done,bytes_total,eta_seconds?} / error / unknown) + getLuksProvisioningStatus on the TdxQuoteRpc trait.
  • enclave-server: luks_status.rs reads /run/seismic/status/luks.json (written by seismic-images' setup-persistent-luks) and serves the latest snapshot. Absent file -> Idle; present-but-unreadable -> Unknown, so a broken status pipeline never masquerades as "done". Hosted here because enclave-server is the only node service alive for the whole wipe.
  • mock: returns Idle (no real disk).

For now this is scoped deliberately to the wipe; not a general boot-status surface. Might eventually expand to a full status/liveness check.

…progress

First boot wipes the entire persistent disk to seed dm-integrity tags,
which can take 1h+ and is otherwise an opaque, silent wait. Add a
read-only RPC so the operator CLI can poll it and render a progress bar.

- api.rs: LuksProvisioningStatus type (internally tagged by `state`:
  idle / provisioning{bytes_done,bytes_total,eta_seconds?} / error /
  unknown) + getLuksProvisioningStatus on the TdxQuoteRpc trait.
- enclave-server: luks_status.rs reads /run/seismic/status/luks.json
  (written by seismic-images' setup-persistent-luks) and serves the
  latest snapshot. Absent file -> Idle; present-but-unreadable -> Unknown,
  so a broken status pipeline never masquerades as "done". Hosted here
  because enclave-server is the only node service alive for the whole wipe.
- mock: returns Idle (no real disk).

Scoped deliberately to the wipe; not a general boot-status surface.
@samlaf samlaf requested a review from cdrappi as a code owner June 30, 2026 11:13
@samlaf samlaf merged commit e8cc7bc into seismic Jun 30, 2026
5 of 6 checks passed
@samlaf samlaf deleted the enclave/luks-provisioning-status branch June 30, 2026 11:17
samlaf added a commit to SeismicSystems/seismic-images that referenced this pull request Jun 30, 2026
…tatus (#35)

setup-persistent-luks taps `cryptsetup --progress-json` during the long
first-boot provisioning wipe and publishes it to a tmpfs file that
enclave-server serves via getLuksProvisioningStatus (operator CLI
progress bar). The crypto flags are unchanged -- this only adds the tap.

- setup-persistent-luks: parse --progress-json (merged stdout+stderr) ->
  write /run/seismic/status/luks.json atomically; forward cryptsetup's
  own logs on to journald. Best-effort throughout -- a status hiccup can
  never abort the wipe (ERR trap publishes {"state":"error"}); the file
  is removed on success so the endpoint reads idle.
- tmpfiles: create /run/seismic/status (root-owned; world-readable files
so enclave-server reads them as the enclave user).
- bump enclave pin to the commit adding the getLuksProvisioningStatus
RPC this producer feeds.

Consumer of this is in
SeismicSystems/enclave#196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant