Skip to content

feat(site): Deliver installs over Redfish virtual media - #229

Open
scotwells wants to merge 35 commits into
feat/nso-boot-attachmentfrom
proto/virtual-media-delivery
Open

scotwells wants to merge 35 commits into
feat/nso-boot-attachmentfrom
proto/virtual-media-delivery

Conversation

@scotwells

@scotwells scotwells commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

A prototype of Redfish virtual media as a second boot delivery method, behind the same install contract as network boot, as proposed in #227. Each installation records its method, and a Redfish worker can install a server from media its BMC mounts over verified HTTPS: the installed OS proves the install with a first-boot report carrying a token only that operation's config medium holds, and release is proven from both the BMC and the central media service. Anything sent but unproven ends unknown with a hold, never ready. Stacked on #225; #231 moves the site declaration into enrollment.

Related to #227

How it stays inactive

A site offers only the methods it declares, and one that declares none offers none, so nothing is installed, wiped or commissioned there. Nothing in this PR makes a site declare virtual media, and a server counts as qualified for it only through an annotation staff set by hand. Wipes and commissionings only network-boot, so admission refuses them, and the Metal provider makes no release wipe and claims no boot address, unless every serving site declares network boot. A site that declares only virtual media therefore never uses DHCP, boot addresses or boot NIC attachment. The synthetic staging simulator keeps its network-boot-only declaration and its existing simulated lifecycle, with no DHCP, boot address or boot NIC.

Lab and CI changes

  • The lab BMC lost an insert in some runs: it fetched the medium inside the insert request, so a slow fetch outlasted the worker's 30 second timeout and the install ended unknown. It now accepts the mount at once and fetches in the background, as a BMC does, and a power-on during a fetch starts the server once its media are in.
  • The relay listener closes connections nothing accepted after it closes, and the lab's stale-fence probe field check now compares exact keys.
  • The virtual media suite runs as one more acceptance shard, nightly and on labelled pull requests. It commissions its target before allocating, as the Redfish suite does, because capacity is offered only after a passed commissioning.
  • The allocation package's tests now run in two go-test shards. In one shard they took 594 of go test's 600 seconds, and the site declaration in feat(site): Declare delivery methods in enrollment #231 pushed them over.
  • Burn-in timing starts from the boot server's completed-delivery records. Virtual media writes none, because the media service serves its media, and no burn-in runs over virtual media: commissioning still records no method and needs network boot.

Decisions for a person

  • A site that declares only virtual media cannot finish a release, because wipes have no virtual media path yet: the allocation stays releasing until the site also declares network boot. Accept that for the prototype, or build the provider-network wipe from docs: Propose boot delivery methods behind one install contract #227.
  • Two checks need a real site network before production: that the media service serves a config medium only to the Device's BMC address, and that the first-boot report can come only from the Machine's own address.
  • Commissioning qualification for virtual media, BMCs that do not verify HTTPS, machine class restrictions and static addresses are stubbed or not on this base.

Test plan

  • Unit and envtest tests: fence, journal before send, two-source release proof, every unknown path, worker authentication, refused opens, report source and download checks, wipes and commissionings refused without network boot
  • Lab adapter tests for the accepted mount, a power-on during a fetch, a cancelled, restarted or failed deferred power-on, an eject during a fetch and a failed fetch
  • Every gh pr checks entry green on the head
  • Every acceptance shard green on the head, with the Redfish and virtual media shards green twice in a row

🤖 Generated with Claude Code

@scotwells
scotwells requested review from ecv and kevwilliams November 27, 2026 02:59
@scotwells
scotwells force-pushed the proto/virtual-media-delivery branch from cc53e7e to 09b9fd4 Compare November 27, 2026 17:56
scotwells added a commit that referenced this pull request Nov 27, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 27, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 27, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 27, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 27, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells added a commit that referenced this pull request Nov 28, 2026
The restack onto #229's base keys boot records by operation UID, so the accelerator tests read them that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells
scotwells force-pushed the feat/nso-boot-attachment branch from 7c067e4 to 98c6bf0 Compare November 28, 2026 23:51
@scotwells
scotwells force-pushed the proto/virtual-media-delivery branch from 8ac1862 to a841421 Compare November 29, 2026 00:13
@scotwells
scotwells force-pushed the feat/nso-boot-attachment branch from 98c6bf0 to b477627 Compare November 29, 2026 01:20
scotwells and others added 16 commits November 29, 2026 00:48
No spec carries an object UID, so a virtual media install's window, its
config medium, its journal and its central service records are keyed by
the admission's site key: the operation's kind, name and fence. The media
service opens a window only while custody names that key active, and the
lab's media checks read each window under it. The lab's media phases name
an installation's request and Device incarnation in labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The virtual media suite assumed Colima: its Docker context, and the
host gateway lab Pods use to reach the workstation's media service.

run.sh records the host address and the network Pods arrive from: the
host gateway and loopback under Colima, the kind network's gateway and
subnet on a CI runner. The certificate, the media service's listeners
and the report relay's upstream use them. The workflow runs the suite as
a third mode, in one shard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each held media installation waited out the lab's 5 and 10 minute windows. On CI the fetch window is 2 minutes, which covers the BMC fetching the boot medium after a held install settles, and the report window 3 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A wipe and a commissioning only network-boot. Admission now refuses
either with DeliveryMethodNotOffered unless every serving site offers
network boot, and the Metal provider neither creates a release wipe nor
claims a boot address for one at a site that does not, so the release
reports why. A site that declares only virtual media, or nothing, never
uses its DHCP, boot addresses or boot NIC attachment.

Burn-in timing reads the boot server's write-complete lines, which
virtual media does not write; no burn-in runs over virtual media.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lab BMC fetched a medium inside the InsertMedia request. A slow fetch
outlasted the worker's 30 second Redfish timeout, so the worker recorded
the insert as lost and the install ended unknown, as in 3 of 9 media
runs. As a BMC does, the lab BMC now accepts the mount at once and fetches
in the background. A power-on during a fetch answers at once, reports On,
and starts the target once its media are fetched; a ForceOff cancels it.
A medium ejected during its fetch keeps nothing, and one that cannot be
fetched stays inserted but is never attached. Each insert's lab fault is
chosen with the insert, from the config medium's URL, and recorded there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A relayed connection with a valid PROXY header waited forever to be
handed to Accept once the listener closed, holding its goroutine and its
connection. Closing the listener, or its failing, now closes every
connection not yet accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The harness passed when each window open field's name appeared anywhere
in the probe, such as a comment. It now reads the keys of the body the
probe sends and requires exactly the fields a window open takes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DeviceInstallation gained a required delivery, so an installation stored
before it would fail validation on its next write, including the
finalizer removal retention needs. The schema now leaves it optional, and
admission still refuses an installation that records no known method; a
test covers that refusal. The synthetic manager says why its simulated
site declares network boot only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release proof took an override reported enabled but with no target as
cleared. Any enabled override now leaves release unproven, so the install
ends unknown, and a test covers a BMC that clears only the target.

A window the media service refuses also deletes the operation's config
medium, which holds its report token, at once: no BMC can fetch it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lab BMC read a device's state outside its lock, so two inserts could
both be accepted and an eject could miss the medium a racing insert left.
Both now read and change it under the lock. A deferred power-on waits for
every fetch of its System, including one that starts while it waits. A
fetch follows no redirect and uses no proxy. At start the adapter sweeps
media files no stored state names, and the test's fake virsh writes its
state atomically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewriting the adapter dropped its executable bit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lab bootstrap read a variable this branch renames, so it failed in
every mode. Runs with IPAM, synchronized DHCP or the virtual media suite,
now get its token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Redfish worker RBAC check read the handoff's credential field, which
the handoff no longer has, so the check failed in every Redfish run. It
reads the Device's own credential Secret by name, as the check above it
does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Capacity is offered only after a passed commissioning, so the media suite
timed out allocating a target it never commissioned. It now commissions
target A first, as the Redfish suite does, publishes its dispatch revision
after those, and expects the burn-in's one network boot before the media
installs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A power-on that waits for its media started the target later, and only
then moved the System's reset time, so a reader right after the reset saw
the old time. A BMC reports the reset when it accepts it: the deferred
power-on now stamps the time then, and the later start leaves it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The customer power test merged from the power stack declares no boot
delivery method, so its release wipe waits for network boot forever.
It now declares network boot only, as the other simulated sites do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells
scotwells force-pushed the feat/nso-boot-attachment branch from 97e138c to 31e84ec Compare November 29, 2026 07:19
@scotwells
scotwells force-pushed the proto/virtual-media-delivery branch from c08b5b4 to e451f8c Compare November 29, 2026 07:19
@scotwells scotwells added multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners and removed multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners labels Nov 29, 2026
@scotwells
scotwells requested a review from ecv November 29, 2026 07:19
A power-on that waits for its media reported On and moved the reset time
before it was marked pending, so a failed reset-time write left a System
reporting On with nothing to start it. A start that failed consumed the
boot-once override anyway. The adapter now stamps the reset time first,
and a failed start restores the override and leaves the System Off.
A cancelled wait ends at its next check rather than at the media
deadline, and the lab docs name the accept-time stamp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells scotwells added multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners and removed multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners labels Nov 29, 2026
The allocation package's envtest-backed tests run one after another and
took 594s of go test's 600s package timeout in the rest shard; with the
site declaration on top they timed out. Its tests are now dealt across
two shards, as the custody package's are across three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells scotwells added multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners and removed multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners labels Nov 29, 2026

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve.

Two commits since my last review, both lab or CI only:

  • The deferred power-on now stamps the reset time before marking itself pending, checks for cancellation on every pass rather than only at the deadline, and on a failed start restores the boot-once override and leaves the System Off. A new adapter test covers the failed start through FAKE_VIRSH_FAIL_START.
  • Allocation tests are split across two CI shards, and the rest shard now excludes internal/allocation, so every package is still run exactly once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants