Repository navigation
feat(site): Commission a server over Redfish - #196
Conversation
c456ba3 to
02825ef
Compare
c982b26 to
0f5e486
Compare
02825ef to
c147372
Compare
ee30ce8 to
4ff43c3
Compare
407ca0a to
998d6b7
Compare
4ff43c3 to
c3c3e51
Compare
998d6b7 to
2bcf71a
Compare
c3c3e51 to
3888640
Compare
2bcf71a to
a7c1973
Compare
3888640 to
4edbd10
Compare
a7c1973 to
87b08a6
Compare
4edbd10 to
402c071
Compare
87b08a6 to
6a28951
Compare
49ccca5 to
b7ceaad
Compare
kevwilliams
left a comment
There was a problem hiding this comment.
Hold: inspection can report a wrong answer on large servers or after a worker restart.
- members() stops silently at 64, so a server with more DIMM slots or firmware entries is undercounted, and a faulty DIMM past slot 64 is never health-checked. Fail when the cap is reached.
- Burn-in end time is when the worker journals the verdict, not when the image reported it. A restart after an early report passes the too-short check. Time the end from the receipt.
- checkFirmware takes the first inventory entry matching Name, so a previous version listed first can match the baseline while newer firmware runs. Prefer Id, or reject a name that matches more than one entry.
ecv
left a comment
There was a problem hiding this comment.
Request changes.
The worker only reads hardware and runs one network-booted burn-in, and it never flashes firmware. But the burn-in duration check can pass a run that was too short, and a pass makes the server allocatable.
- Agree with kevwilliams on the burn-in end time:
Runininternal/site/redfishwork/commissioning.gotakes the end fromwork.JournaledAt("burnin-verified"), which is when the worker journaled the verdict, not when the image reported. A worker that restarts after an early report journals late, socompleted.Sub(started) < durationpasses. Time the end from the receipt or console log, not the journal. - Agree with kevwilliams on
members()ininternal/redfish/hardware.go: it stops silently at 64, so a server with more components is undercounted and a faulty one past slot 64 is never health-checked. Return an error when the cap is reached instead of truncating. - Agree with kevwilliams on
checkFirmware: it takes the first inventory entry matchingName, so an old version listed first can satisfy the baseline while newer firmware runs. Match by Id, or reject a name that matches more than one entry. - Effects on the server are limited to power-off, a one-time PXE boot override and power-on, through the same journaled step machinery as wipe and install. Power-off and arm are marked Idempotent, power-on is sent once and observed after a crash (no sign of boot leaves the outcome unknown), and a stopped-at-deadline worker closes boot admission. Inspection and firmware evidence are stored before the first effect and reused on resume.
- The worker does not itself check for an approved plan. It relies on coordinator admission from #195 (
Pinsand the qualified-approval check), so the plan gate is only as strong as that code.
Follow-ups:
- Add a test that kills the worker between the receipt and the journal write and asserts the too-short check still fails.
- Confirm each new Redfish GET has its own timeout, or state where the limit comes from; I found none in
hardware.gobeyond the caller's context.
Add the DeviceCommissioning worker. It inspects the server and checks its firmware with GETs only, stores that passing evidence, then boots the plan's burn-in image once over the network and reads its one result receipt. A resumed worker reuses the stored inspection, so nothing read after an effect becomes an inspection verdict. A mismatch, a failed or short burn-in, or an unhealthy server after burn-in is a proven Failed verdict. A plan whose burn-in image the site does not serve is refused before anything is sent. Burn-in is timed from the boot server's delivery of the image, not from power-on, so a slow firmware start or network boot cannot make an early-reporting image long enough. The Redfish client reads processors, memory, storage, network interfaces and the firmware inventory. Absent and Disabled memory does not count. Drives come from Storage, counted once however often they are linked, or from SimpleStorage when Storage yields no disk. The boot server passes the burn-in duration to the image, and the lab boot image gains a burn-in mode. Evidence names the approved plan reference, not a UID. The lab adapter reports each target's serial, no longer links the emulator's sample Storage drives, and serves a read-only firmware inventory, so a commissioning can pass against the lab. No site registers the worker yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The boot log records whole seconds, so burn-in is timed from the second after the last delivered file. Nothing tested that round-up: timing from the logged second passed every test. Pin it with a log whose files finish out of order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three ways the Redfish commissioning worker could report a wrong answer: - Hardware collections stopped silently at 64 members, so a server with more DIMM slots or firmware entries was undercounted and a faulty module past the 64th never checked. Inspection now follows every Members@odata.nextLink page and fails at 1,024 members or 64 pages. - Burn-in ended when the worker journaled it, so a worker restarted after an early report passed the too-short check. It now ends at the last time a worker saw no receipt, stored as burn-in runs. - A firmware baseline took the first entry matching Name. It now takes the entry with that Id, and refuses a Name two entries share. A BMC reporting another serial or UUID is now refused instead of getting a Failed verdict, which custody no longer accepts without the identity. Each GET's limit is the client's per-request timeout, now documented and pinned by a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b7ceaad to
54d9276
Compare
|
Thanks, both. Every point is fixed at 54d9276, and each new test fails when its fix is removed.
|
kevwilliams
left a comment
There was a problem hiding this comment.
Component reads now fail at the member cap, burn-in ends at the last receipt-free sighting, and a firmware name matching several entries is a mismatch.
ecv
left a comment
There was a problem hiding this comment.
Approve.
All three findings are fixed with tests, and the one new behavior (a mismatched BMC identity is refused instead of getting a Failed verdict) is consistent with #195. I compared the PR's own commits (cc047e3, 38e85c8, 54d9276); the old head is gone after the rebase.
- Agree with kevwilliams on the 64 cap, fixed:
allMembersfollowsMembers@odata.nextLinkand returnsErrTooManyMembersat 1,024 members or 64 pages instead of truncating, and the disk paths fail at the bound too.TestHardwareFailsACollectionAtTheBoundandTestHardwareReadsEveryMemoryModulepin it. - Agree with kevwilliams on the burn-in end, fixed: the end is now the last time any worker saw no receipt, stored through
PutRecordat most every 30s and at the moment the receipt first appears. A restart can only shorten the recorded burn-in, never lengthen it. With nothing stored the zero time fails the check.TestARestartAfterAnEarlyReceiptStillFailsTooShortis the test I asked for. - Agree with kevwilliams on
checkFirmware, fixed: it matches by Id first, falls back to Name only when exactly one entry has it, and reports a mismatch for a Name two entries share.TestFirmwareMatchesByIdAndRefusesAnAmbiguousNamecovers it. - Per-GET timeout, fixed: the comment now says each GET is bounded by the client's per-request timeout and the whole read by the operation deadline, and
TestHardwareBoundsEachRequeststalls a read to prove it. - New code checked:
preflightrefuses a BMC reporting another serial or UUID before anything is sent, so no verdict names a server nobody admitted. The 30s persistence interval also means a worker restarted after the receipt could record a burn-in up to 30s short of the plan and fail a legitimately long run. That fails closed and a retry fixes it.
Follow-ups:
- A burn-in failed only because of a restart looks the same as a real too-short one; consider a distinct message.
- This PR is based on
feat/device-commissioning-kind, so it merges only after #195 does.
Related to #185. Stacked on #195.
A site can commission a server over Redfish. It checks hardware and firmware with reads only, boots the plan's burn-in image once, and reports a proven pass or fail. A BMC that reports another serial or system UUID gets no verdict: the operation is refused before anything is sent. Every member of each hardware and firmware collection is read, following Redfish paging, and a collection that reaches 1,024 members or 64 pages fails the inspection. Burn-in is timed from when the boot server delivered the image to the last time a worker saw no receipt, so neither a slow firmware start nor a worker restart after an early report can make a short burn-in pass. A firmware baseline matches the inventory entry with its Id, and a Name two entries share matches neither. No site registers the worker until #200.
Landing
The capacity stack lands first: #182, #219, #208 and #232 (all merged), then #195, #196, #200 and #201. Overlapping PRs on other stacks (cleaning #193, #202, #205, #206 and #207, power #190, NSO and IPAM #198 and #225, virtual media #229) rebase onto it, and #205 adds its NVMe lab drive on top of the lab model in #196.
What the lab now proves
The lab emulator reports each target's serial, its one real disk and a firmware inventory. The worker reads disks from the simpler storage listing when the newer one lists none. In the multi-plane Redfish runs on the top of the stack, the site commissions lab target A through the emulator. Hardware and firmware match the plan, the server boots once over the network, its one burn-in receipt says passed, and target B receives nothing.
Test plan
🤖 Generated with Claude Code