Skip to content

feat(fleet): proxy a node's OS image lifecycle (stage, activate, rollback) - #203

Merged
Bugs5382 merged 2 commits into
mainfrom
feat/187-os-image-lifecycle-web
Oct 15, 2026
Merged

Bugs5382 merged 2 commits into
mainfrom
feat/187-os-image-lifecycle-web

Conversation

@Bugs5382

Copy link
Copy Markdown
Contributor

What and why

cryptosctl image status/stage/rollback/activate has no web equivalent. The node already
exposes StageImage, ActivateImage, RollbackImage and GetImageStatus; the manager never
called them.

FleetService gains GetNodeImageStatus (viewer-readable, not audited), StageNodeImage,
ActivateNodeImage and RollbackNodeImage. Staging fetches image_url itself rather than
taking an upload: the manager streams the image straight into the node's chunked StageImage
RPC, so a GiB-sized image never has to cross a browser's Connect client (client-streaming isn't
portable there) or sit fully buffered in a JSON request body. Activating still requires
confirm_ca_cn, the same confirmation RebootNode uses, because it is itself a reboot. All
three writes are admin-gated and audited; the node's own refusals (a bad signature, or
FailedPrecondition when another upgrade is already running) are surfaced through the existing
node-refusal mapping unchanged.

Not exposed as an MCP tool yet; the catalog marks all four excluded.

Refs #187

Verification

  • Lint clean
  • Tests pass
  • Build succeeds
  • Documentation updated (if behavior or API changed) -- no user doc change; this is a backend
    proxy for a cryptosctl command already documented, the web surface and its docs follow in a
    cryptos-web PR.

How this was verified

  • task lint (golangci-lint): 0 issues.
  • task generate:verify: committed gen/ matches a fresh buf generate.
  • systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=0 go test ./...: all packages pass,
    including new tests in internal/fleet (handler authorization, audit, node-refusal mapping) and
    internal/nodeclient (a real TLS gRPC fake node proves StageImage chunks and reassembles an
    image larger than one chunk byte for byte).
  • go vet ./... and gofmt -l .: clean.

…back)

cryptosctl image status/stage/rollback/activate has no web equivalent:
the node already exposes StageImage, ActivateImage, RollbackImage and
GetImageStatus, but the manager never called them.

FleetService gains GetNodeImageStatus (viewer-readable, not audited),
StageNodeImage, ActivateNodeImage and RollbackNodeImage. Staging fetches
image_url itself rather than taking an upload: the manager streams the
image straight into the node's chunked StageImage RPC, so a GiB-sized
image never has to cross a browser's Connect client (client-streaming
isn't portable there) or sit fully buffered in a JSON request body.
Activating still requires confirm_ca_cn, the same confirmation
RebootNode uses, because it is itself a reboot. All three writes are
admin-gated and audited; the node's own refusals (a bad signature, or
FailedPrecondition when another upgrade is already running) are
surfaced through the existing node-refusal mapping unchanged.

Not exposed as an MCP tool yet; the catalog marks all four excluded.

Refs #187

Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
@Bugs5382 Bugs5382 self-assigned this Oct 15, 2026
@Bugs5382
Bugs5382 marked this pull request as ready for review October 15, 2026 16:06
@github-actions github-actions Bot added the enhancement New feature (feat). Minor version bump. label Oct 15, 2026
@Bugs5382
Bugs5382 merged commit 41f0595 into main Oct 15, 2026
10 checks passed
@Bugs5382
Bugs5382 deleted the feat/187-os-image-lifecycle-web branch October 15, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature (feat). Minor version bump.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant