Repository navigation
feat(fleet): proxy a node's OS image lifecycle (stage, activate, rollback) - #203
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
cryptosctl image status/stage/rollback/activatehas no web equivalent. The node alreadyexposes
StageImage,ActivateImage,RollbackImageandGetImageStatus; the manager nevercalled them.
FleetServicegainsGetNodeImageStatus(viewer-readable, not audited),StageNodeImage,ActivateNodeImageandRollbackNodeImage. Staging fetchesimage_urlitself rather thantaking an upload: the manager streams the image straight into the node's chunked
StageImageRPC, 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 confirmationRebootNodeuses, because it is itself a reboot. Allthree writes are admin-gated and audited; the node's own refusals (a bad signature, or
FailedPreconditionwhen another upgrade is already running) are surfaced through the existingnode-refusal mapping unchanged.
Not exposed as an MCP tool yet; the catalog marks all four excluded.
Refs #187
Verification
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: committedgen/matches a freshbuf 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) andinternal/nodeclient(a real TLS gRPC fake node provesStageImagechunks and reassembles animage larger than one chunk byte for byte).
go vet ./...andgofmt -l .: clean.