Skip to content

DO NOT MERGE: staging integration of the PXE stack and physical inventory subset - #91

Closed
scotwells wants to merge 13 commits into
mainfrom
staging/inventory-integration
Closed

scotwells wants to merge 13 commits into
mainfrom
staging/inventory-integration

Conversation

@scotwells

@scotwells scotwells commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

This is a deployment branch, not a change proposal. Do not merge or review it as a unit. Review happens in the stacked PRs (#59 → #78 → #79 → #80 → #81 → #82 → #86 → #90).

The PR exists so CI runs on the exact commit an environment deploys. ci.yml runs only on pull requests and pushes to main. publish.yml publishes this branch as fleet-kustomize:v0.0.0-staging-inventory-integration, plus immutable timestamped tags.

This replaces #89, whose branch was rebuilt under this name when the inventory change was reworked.

What it contains

config/milo, config/base, config/components, and config/overlays are identical to main. The only conflict was in config/README.md, where both sections were kept.

Keeping it current

git checkout staging/inventory-integration
git merge origin/main origin/feat/manual-inventory-records
git push

Each push republishes the floating tag. Delete the branch once the stack lands on main, and move environments back to v0.0.0-main.

Verification

The branch was rebuilt from current main after #90 moved to DeviceClaim and Device.

Locally: go vet ./... and go test -race ./... pass, including the envtest suites. All kustomize build roots in ci.yml, the synthetic-staging, overlay-isolation, and standalone render validators, and doc-link validation also pass. CI results on this PR are the record.

🤖 Generated with Claude Code

scotwells and others added 11 commits November 18, 2026 13:11
Executor results now carry InputDigest, a SHA-256 commitment to the exact
request (minus its ID) computed by simulator.RequestDigest. The coordinator
rejects any terminal result whose digest does not match the request it
retained, treating the mismatch as an unknown outcome rather than success,
and returns the digest with each InstallationResult. The standalone install
phase checks the retained simulator history against it.

The executor contract documents exact-request replay and the meaning of
Lookup's not-found/unknown answers, and Lookup rejects dot-segment IDs.
Adversarial tests cover wrong-asset evidence, path-segment IDs and digest
binding of every request field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The standalone runner gains a reinstall phase: a distinct Installation that
names the initial Installation as its predecessor, on the same allocation,
recovering the same successor operation across retries and restarts. Before
each install the claim's Ready condition is set Unknown, so an unverified
completion closes readiness and keeps the capacity occupied.

hack/run-standalone-smoke.sh runs the full allocate, install, reinstall and
release lifecycle in a disposable kind cluster (task standalone:test). CI runs
its offline tests and a standalone-smoke job that executes it end to end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The kind smoke restarts the simulator and immediately runs the recovery
phase. On a slow runner the phase's first request could reach no pod
while the Service moved to the new one, and the lifecycle correctly
reported that transport failure as an unknown outcome. The phase now
waits, without effect, until the simulator answers readiness through its
Service, so the recovery check measures recovery and not the handover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
internal/localvm is a bounded libvirt executor behind the existing executor
contract. It boots a blank disk over iPXE from a digest-pinned installer,
admits one-time network boot only for the retained operation, verifies the
installed receipt from serial output and the domain's disappearance, then
boots disk-only. Recovery replays the retained request without a second
installer start; cleanup deletes only that binding's disks after verifying no
matching domain, and returns a request-bound clean result.

cmd/fleet-local-vm and hack/local-vm/run.sh drive allocation, install,
crash recovery, reinstall, cleanup and reuse through the shared lifecycle
library against a disposable Kubernetes API (task local-vm:acceptance, TCG
in the task-owned Colima profile). This is not KVM, hardware or production
qualification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ned sites

One command (task multiplane:acceptance) composes the local VM executor with
native Milo project APIs, real Karmada delivery and reflection, and a
Kubernetes-native site in a dedicated Colima profile:

- internal/coordination defines the delivered handoff and journal-derived
  observation contract between management and a cell, with exact-request
  digests, epoch fencing and wrong-cell, stale and duplicate rejection.
- internal/multiplane drives allocation, install, release and reuse through
  the shared lifecycle library; Coordinator.ClaimReleased lets it avoid
  restoring protection after verified release.
- cmd/fleet-multiplane runs the management phases and the site roles.
- config/site holds the Flux-owned shared site services and a kro graph that
  creates only per-handoff RBAC and bounded worker Jobs; config/multiplane
  holds per-cluster Flux sources for Milo, Karmada, kro and the site.
- hack/multiplane runs the bounded phases, fault injection (worker Pod/Job
  interruption, delivery and reflection faults, wrong location, Flux drift,
  restart and fail-closed cases) and writes sanitized evidence.

CI runs the harness's offline tests and shellcheck. Production authority,
KVM and hardware remain unqualified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
internal/redfish implements the executor contract over Redfish using gofish
v0.27.0 for transport and schema decoding, behind Fleet's own guards: exact
endpoint and System identity checks across every page of the Systems
collection, advertised allowable-value checks, no redirects or environment
proxy, bounded bodies and errors that never carry credentials or URLs. Each
boot override is one conditional PATCH (If-Match when an ETag is present)
with readback and no Settings fallback; each reset is one POST with no
resend. Recovery is observation-based and treats lost responses as Unknown.
On may be repeated, bounded to three attempts, only while the System is
still Off, armed and silent; this is not exactly-once delivery. Cleanup
PXE-boots a wipe environment that zeroes and reads back the disk.

task multiplane:redfish-acceptance runs the multi-plane composition with
Redfish workers that have no libvirt path, against the unmodified DMTF
Redfish Interface Emulator 1.2.2 and a lab-only libvirt adapter driving two
persistent lab VMs. Credentials are synthetic and per run. This is not
physical BMC or hardware qualification; see docs/operations/redfish-lab.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A network boot needs an address, but DHCP configured outside Fleet answers
every reboot and cannot prove provisioning access ended. Fleet now publishes
a reservation for a boot NIC only while its network boot is admitted, and
treats the DHCP owner's applied reports as evidence: no network boot before
a report shows the reservation served, and no completion until every
instance that served it reports it withdrawn.

- Enrollment records per-target BMC endpoints, endpoint-scoped System
  identity, and a static or synced DHCP mode with validated provisioning
  attachments.
- The site's dhcp-feed role serves the canonical feed and accepts
  authenticated, self-verifying applied reports on its own listener.
- fleet-dhcp-sync applies the feed to Kea through its control socket and
  reports only what Kea accepted.
- The boot network enhancement proposes the design; the operations guide
  records the implemented contract and what remains proposed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells and others added 2 commits November 19, 2026 15:43
Add a minimal subset of the proposed physical inventory API in
fleet.datumapis.com/v1alpha1. A DeviceClaim is the plan for one rack slot:
facility, rack, position and face, expected model, and expected ports with
their expected cable peers. A Device is the actual asset, bound to exactly
one claim when an operator registers detected hardware. It records serial,
SMBIOS system UUID, model, optional BMC endpoint, interfaces, and Manual
provenance.

Both kinds are operator-written and have no controller. Registration
authorizes no hardware effect and creates or changes no MachineCapacity.
Status is a reserved subresource with no fields and no writer.

CEL keeps the records attributable and their identities stable:
- every edit must advance provenance.recordedAt
- a Device's claimRef and identity are immutable, so a hardware swap is a
  new Device bound to the same claim
- names are unique, MACs are lowercase and recorded once, and BMC endpoints
  are https without credentials

config/inventory packages only the CRDs as an opt-in root. Trust,
enrollment, reservations, and the Facility, Rack, and Cable kinds stay
deferred to the inventory proposal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Staging tracks this branch. It combines current main, which staging
already runs, with the PXE stack and the operator-written DeviceClaim and
Device kinds, so moving staging here keeps main's multi-project manager
and setup-fee pricing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	config/README.md
@scotwells
scotwells force-pushed the staging/inventory-integration branch from bff2c79 to 52491ca Compare November 19, 2026 21:43
@scotwells scotwells changed the title DO NOT MERGE: staging integration of the PXE stack and manual inventory records DO NOT MERGE: staging integration of the PXE stack and physical inventory subset Nov 19, 2026
@scotwells

Copy link
Copy Markdown
Contributor Author

Retired. The PXE stack (#59 → #86) and #90 are now rebased onto main, so staging deploys feat/manual-inventory-records directly and this integration branch is no longer needed.

@scotwells scotwells closed this Nov 19, 2026
@scotwells
scotwells deleted the staging/inventory-integration branch November 19, 2026 22:09
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