Skip to content

feat: Record what each server's BMC reports on its inventory record - #165

Merged
scotwells merged 3 commits into
feat/manual-inventory-recordsfrom
feat/bmc-discovery
Nov 24, 2026
Merged

scotwells merged 3 commits into
feat/manual-inventory-recordsfrom
feat/bmc-discovery

Conversation

@scotwells

@scotwells scotwells commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Inventory records hold only what the inventory source expects, with nothing from the hardware to check them against. This adds a read-only discovery service that records what each server's BMC reports next to the expected facts and flags any disagreement. It sends a BMC password only after an operator approves that BMC's TLS key fingerprint, which the first anonymous contact records. This lands on the staging feature branch first, once CI is green, and its overlap with #153, #155 and #86 is resolved at the next rebase onto main.

Test plan

  • All Go tests pass with the race detector, including an end-to-end run against a local TLS Redfish service.
  • Manifest renders and repository validators pass.
  • The container image build was not run locally; the publish job must pass before this is marked ready.
  • Not run against any vendor BMC.

Resolves #130.

🤖 Generated with Claude Code

@scotwells
scotwells requested review from ecv and kevwilliams November 24, 2026 02:00
@scotwells

Copy link
Copy Markdown
Contributor Author

Where things are, for review:

  • Pinning, probe and read-only inventory: internal/redfish/pin.go, internal/redfish/inventory.go. The executor still uses the system trust store.
  • Status types and schema: internal/api/inventory/v1alpha1/types.go, config/components/inventory/crds/fleet.datumapis.com.yaml.
  • Role: config/components/inventory/roles/discoverer.yaml. The Device ProtectedResource now declares updateStatus and the status subresource.
  • Controller and --once: cmd/fleet-bmc-discovery, internal/bmcdiscovery.
  • Deployment base and synthetic examples: config/base/bmc-discovery. The publish workflow rewrites its image tag in the bundle.
  • Operator guide: docs/operations/bmc-discovery.md.

scotwells and others added 3 commits November 23, 2026 20:16
Add PinnedTLSConfig and NewPinnedClient, which verify a BMC by the
SHA-256 of its leaf SubjectPublicKeyInfo instead of the system trust
store, through the existing transport guard. Add Probe, an anonymous
handshake and service root GET that records the presented key, and
Client.Inventory, a GET-only lenient read of Managers, Systems and
their EthernetInterfaces. The executor's behavior is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Device status now holds retained BMC observations (TLS key, service
root, inventory) and Reachable, Authenticated, Discovered,
IdentityMatched and PublicKeyUnique conditions. Spec identity stays
authoritative and immutable. The Device ProtectedResource declares
updateStatus and the status subresource, and the new
inventory-discoverer role grants Device reads and status writes only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add fleet-bmc-discovery, a single-replica controller that reads Devices
from one Milo project and credential Secrets from its own namespace,
probes each BMC anonymously, sends the credential only when the
observed key equals the approved pin, and writes only Device status.
It retains earlier observations on failure, backs off per Device,
spaces contacts per endpoint, reports shared TLS keys, and has a
--once mode that prints the statuses without writing.

Ship config/base/bmc-discovery, a synthetic credential Secret and
sidecar snippet, the binary in the fleet image, the base in the
published bundle, and docs/operations/bmc-discovery.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells scotwells changed the title Record what each server's BMC reports on its inventory record feat: Record what each server's BMC reports on its inventory record Nov 24, 2026
@scotwells
scotwells marked this pull request as ready for review November 24, 2026 02:29
@scotwells
scotwells requested a review from a team as a code owner November 24, 2026 02:29
@scotwells
scotwells merged commit f7baa53 into feat/manual-inventory-records Nov 24, 2026
9 checks passed
@scotwells
scotwells deleted the feat/bmc-discovery branch November 24, 2026 02:29
@scotwells

Copy link
Copy Markdown
Contributor Author

Second review pass on head f96c790 found two agreeing verdicts.

pr-rereviewer: VERDICT merge. It confirmed all four first-pass fixes landed.

pr-conventions-reviewer: VERDICT merge. The body length warning from the first pass is fixed. Three nits remain and were left as they are: the packaging commit subject is 53 characters against a 50 target, a suggestion to split the packaging commit, and a rewrap of config/README.md line 58.

The session applied the first-pass findings before this pass and the reviewers re-checked them against the pushed head. No new commits were added in this phase. The reviewers' RAN lists were not passed to this phase, so they are not repeated here.

CI is green on f96c790: validate, standalone-smoke, publish-container-image, both UI plugin image jobs, publish-kustomize-bundle and the CLA check all passed.

The overlap with #153, #155 and #86 is a known decision: this lands on the feature branch now and the overlap gets resolved at the next rebase onto main.

Auto-merge is enabled with the merge method (merge commit). The base branch has no pull request ruleset, so auto-merge can complete without a human approval here.

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.

1 participant