Skip to content

srv3 boot-once-to-CD entrypoint: boot_hook_command for the WebUI-NBD install - #5750

Closed
gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/neat-boar-71-bootcd
Closed

gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/neat-boar-71-bootcd

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

The Redfish boot leg for the srv3 WebUI-NBD virtual-media install — the boot_hook_command the Playwright KVM runner (lane: quick-bear-692, extdeps.bmc.webui_kvm) calls synchronously between attach and wait.

func srv3_boot_once_cd(): stage netrc (factory creds) → PATCH /Systems/system Boot Target=Cd/Enabled=Once → POST ComputerSystem.Reset ForceRestart. The host boots once into the NBD-backed virtual CD while the media stays mounted (the runner keeps its browser/NBD session alive across this call).

Why it's needed / why Cd works but VirtualMedia doesn't

This board's BMC firmware (02.07.00) does not expose Redfish VirtualMedia (404) — proven live — so the ISO is attached via the WebUI-NBD path, not Redfish. But BootSourceOverride does support Cd (the probe showed None/Pxe/Hdd/Cd/Diags/BiosSetup; see extdeps.bmc.capability), and the NBD media presents to the host as the CD device — so the boot half stays in our Redfish model.

Fail-closed

Any netrc/body-stage/PATCH/POST failure → exit_failure (nonzero). The runner honors the exit code as the sole boot-success oracle and aborts (no wait/teardown) on nonzero — a failed boot-set with media attached is a loud stop.

Discipline

  • Reuses the forward-staged boot_override_body/reset_body from gunbc.tools.bmc_onboard (their named os-install consumer, per that module's bmc_redfish_json_concat_debt) — no §3 fork.
  • Wire shapes (Cd/Once override body + ForceRestart reset body) pinned by-execution in srv3_boot_once_cd_witness_test.dag (3/3 green). The live PATCH/POST is operator-gated (runner fires only under --attach).
  • 🟡 secret-on-disk scaffold marked with dissolve-on (same debt as bmc_onboard).

Command the runner uses:

gunbc run --source-root dsl --entry dsl/gunbc/srv3_boot_once_cd.dag --function srv3_boot_once_cd

🤖 Generated with Claude Code

…NBD install

The boot leg for the srv3 WebUI-NBD virtual-media install (the realization of
the install mechanism this board's firmware does NOT expose over Redfish). The
Playwright KVM runner (extdeps.bmc.webui_kvm, KVM lane) attaches the install
ISO as a local-file NBD virtual CD and keeps its browser session alive; this
nullary entrypoint is the command the runner exec's SYNCHRONOUSLY between
attach and wait: PATCH /Systems/system Boot Target=Cd/Enabled=Once, then POST
ComputerSystem.Reset ForceRestart, so the host boots once into the NBD CD with
media still mounted.

FAIL-CLOSED + EXIT-CODED: any netrc/body-stage/PATCH/POST failure returns
exit_failure (nonzero) so the runner aborts without proceeding to wait/teardown
-- the runner honors the exit code as the sole boot-success oracle. Boot-to-Cd
is live on this board's BMC firmware 02.07.00 (BootSourceOverride supports
Cd even though VirtualMedia/BIOS-attrs are not; see extdeps.bmc.capability).
Reuses the forward-staged boot_override_body/reset_body from
gunbc.tools.bmc_onboard (their named os-install consumer, per that module's
bmc_redfish_json_concat_debt) -- no §3 fork.

Command (the runner's --boot-cmd / boot_hook_command value):
  gunbc run --source-root dsl --entry dsl/gunbc/srv3_boot_once_cd.dag --function srv3_boot_once_cd

Wire shapes pinned by-execution (Cd/Once override body + ForceRestart reset
body); the live PATCH/POST is operator-gated (runner fires only under --attach).
3/3 witnesses green; compile-clean (func typechecks).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing to rework alongside #5748. Same issue: this PR dumps prose into data srv3_boot_once_cd_doc: String and data srv3_boot_secret_on_disk_debt: String instead of using the structured std.disposition carrier the codebase actually uses (Disposition = Scaffold { dissolves_to, bind: DeclarationRef{...} }, as in gunbc/tools/bmc_onboard.dag). The structured boot leg (staging -> PATCH BootSourceOverride Cd/Once -> POST Reset, fail-closed exit-coded, reusing the forward-staged body builders) is sound and will be re-landed by the rework with marks as structured dispositions and rationale in the PR/commit. Superseded. — sent from neat-boar-71

@gunbai-bot gunbai-bot Bot closed this Jun 24, 2026
gunbai-bot Bot pushed a commit that referenced this pull request Jun 24, 2026
…s Disposition

Two closed PRs re-landed with documentation moved to PR/commit body:

PR #5748 (BMC capability solve + firmware catalog):
- extdeps/bmc/capability.dag: BmcCapability coproduct + BmcFirmwareCapabilityRow
  catalog grounded from live Redfish probe + ASRockRack release notes.
  §3 dissolution: VirtualMedia is a firmware-version capability (membership in
  this catalog), not a board property (the prior RedfishVirtualMediaSupport flag).
- extdeps/bmc/types.dag: removed RedfishVirtualMediaSupport (dissolved upstream).
- extdeps/boards/asrock_rack.dag: removed asrock_altrad8ud_virtual_media_support
  and its import; firmware catalog is the single authority.
- gunbc/os_install_mechanism.dag: OsInstallMechanism coproduct + solve_install_mechanism
  derives mechanism from firmware capabilities (§4 inhabitance-solve); srv3 today
  solves to PxeHttpInstall (no VirtualMedia row for this firmware line).
- test/claim/bmc_capability_solve_witness_test.dag: 5 witnesses grounding the solve
  (srv3 capabilities; catalog has no VM firmware; srv3→PXE; VM-firmware flips to
  FirmwareUpdateThenVirtualMedia; node with VM solves direct).
- test/claim/srv3_os_install_witness_test.dag: replaced board-level VirtualMedia match
  with firmware_exposes check against openbmc_2_07_00_capabilities.

PR #5750 (srv3 boot-once-cd entrypoint):
- gunbc/srv3_boot_once_cd.dag: srv3_boot_once_cd() func — stage netrc + PATCH
  BootSourceOverride(Cd/Once) + POST ComputerSystem.Reset(ForceRestart). Fail-closed:
  any stage returns exit_failure. Reuses boot_override_body/reset_body from
  gunbc.tools.bmc_onboard (named os-install consumer of bmc_redfish_json_concat_debt).
  srv3_boot_secret_on_disk_debt promoted from String to Disposition = Scaffold
  { dissolves_to: RealizationDispatch, bind: extdeps.filesystem.filesystem_io.Filesystem }
  matching the pattern in bmc_onboard.
- test/claim/srv3_boot_once_cd_witness_test.dag: 3 pure wire-shape witnesses
  (Cd/Once override body; ForceRestart reset body; netrc path staged).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 24, 2026
…srv3 boot-once-CD (structured Disposition) (#5765)

* WIP: Re-land #5748 (BMC firmware capability catalog) + #5750 (srv3 boot-once-

* Fix parse errors: remove let-binding type annotation + move == onto same expression line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

0 participants