Repository navigation
Conversation
e8317b9 to
f735b9c
Compare
f735b9c to
c6f1fb2
Compare
db99e2c to
0c5c23f
Compare
|
@scotwells could you rebase Staging's fleet follows this branch's bundle ( After the rebase, staging should pick up the new pricings within a few minutes. The five old fees will stay, since the Kustomization doesn't prune. I'll clear those up separately; nothing uses them yet. |
08d6dde to
42086bb
Compare
|
@mattdjenkinson Thanks for flagging this—updated as requested. |
The local VM commissioning worker timed burn-in from the guest's start to the journaled verdict, so a slow network boot or a worker restart after an early receipt could make a short burn-in pass. It now uses the Redfish worker's rules through a shared burnin package: burn-in starts the second after the boot server's last delivery and ends at the last stored sighting of the console without the receipt. A site that boots its guest directly has no delivery log, so it refuses commissioning. A short burn-in no worker watched end, because a restart fell inside it, now fails with its own mismatch so staff know a re-run may pass. Related to #196 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The manager's leader election records each lease change as a core Event in fleet-system, and the API server refused it: the fleet-manager service account could only manage its lease there. The leader-election Role now also grants create and patch on core events in that namespace. Patch is what the recorder uses when the same change repeats. TestLeaderElectionCanRecordEvents reads the Deployment, the Role and its binding, and requires the service account, in the namespace that holds its lease, to manage the lease and record those Events. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(bmc-discovery): Record the reset actions each BMC offers
…events fix(manager): Let leader election record Events
An omitted resetTypes meant both "the BMC offers none" and "the read failed". The field now uses omitzero, so an empty advertised list, inline or from the ActionInfo, is stored as []. The previous omitempty tag dropped it on every marshal, including the Device's JSON deep copy. An omitted list now always means unknown. A new ResetTypesRead condition reports why the list is unknown: ResetActionMalformed, ActionInfoNotFound, ActionInfoUnreadable, ActionInfoMalformed or TooManyResetTypes. More than 16 distinct types is now unknown instead of a truncated list, which would refuse a type the BMC offers. Discovered and the rest of the inventory are unchanged, and a rejected credential still fails the whole read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reset type list of only blank or null values was stored as an empty list, which reads as "offers none" and would refuse every action. It is now unknown with ResetActionMalformed. A truncated ActionInfo body is ActionInfoMalformed rather than unreadable. The True ResetTypesRead message and the docs now say it means no read failed, not that a list was recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(site): Time local VM burn-in from image delivery
An empty resetTypes list cannot be told from an omitted one: the field is omitempty, and pruning, apply and other clients do not keep an empty list reliably. resetTypes goes back to #181's tag unchanged. A per-System resetTypesObserved boolean is now true only when this read got an advertised list, inline or from the ActionInfo, even an empty one. A failed read, a System that advertises no list, a list of only blanks or more than 16 types leaves it absent, so the types are unknown. ResetTypesRead keeps explaining failures for operators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An empty inline reset list next to an ActionInfo without ResetType values was observed as an empty list, which power reads as offers none and would refuse every action. With an ActionInfo, only its values now count, so that case is unknown and the live BMC check decides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each requester claims an IPAM address before it creates an installation or wipe and carries it in the operation's boot network input. Admission refuses an address its claim no longer holds. The site publishes the admitted snapshot's boot MAC at that address only while the boot is open, records publishing as a sent step, and succeeds only when no DHCP instance still serves any reservation of the Device. Claims are released only after their operation ended unheld. Site enrollment no longer names MACs or provisioning addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Complete serial-only Device UUIDs from live discovery without per-host configuration
Route enrolled physical Devices through the provider custody coordinator
feat: Own reusable isolated DHCP configuration in Fleet
Prepare isolated DHCP producer runtime and proof tools
feat(ui): use datum-ui Badge, ButtonGroup and Spinner in inventory
Design Device-owned host networking and immutable installation snapshots
…oning Add identity-bound commissioning and fence-only recovery
Support owner-approved gateway transport
Update: Milo is the single home, plus a staff portal view
Registration in Milo.
config/milonow includesconfig/components/inventory:discovery.miloapis.com/parent-contexts: Project.fleet.datumapis.com-deviceclaimand-device. TheirserviceRefisfleet.datumapis.com, because openfga-provider indexes ProtectedResources by{apiGroup}/{plural}. They grant noupdateStatus.fleet.datumapis.com-inventory-viewer(get, list, watch) and-editor(inherits the viewer role and adds writes).Access. No
metal.datumapis.comrole includes or inherits these roles, so consumer, claimant, viewer and provider roles grant no inventory access. Environments bind the inventory roles explicitly, scoped to the provider project. Records live in the provider project next to MachineCapacity, sodeviceRefresolves by name. Neither management-cluster overlay installs the kinds.config/inventory. It now renders only the component's CRDs, for the management-cluster install that predates the move. It is removed once that environment has cut over.Staff portal. The provider plugin (
ui/provider), the staff-portal Module Federation remote already deployed with Fleet, gains a read-only Inventory tab:inventorylists DeviceClaims across namespaces with placement, expected model, bound Device and serial, and separately lists Devices whose claim is missing.inventory/:namespace/:claimshows the claim's placement, expected ports and peers, and provenance. It also shows each bound Device's model, serial, system UUID, BMC endpoint, interfaces, unmapped MACs and provenance. The most recently recorded Device counts as current; earlier ones are labelled.Docs. The ops doc covers where records live, the roles, the portal, and a recorded deliberate divergence from #63: Milo-resident provider inventory, instead of #63's protected management-side ledger and "private inventory" stance.
Verification for
08d6dde.config/miloserves the kinds with no metal role granting them. Plugin tests (14 new, 52 total) cover the list, detail, restricted, empty, unbound and replacement cases. The consumer plugin still passes.milorender matches the source. The provider plugin image…-20261119-232706contains theinventorypages.datumctl --project datum-cloud get deviceclaims.fleet.datumapis.comreturns Forbidden, not "unknown resource type": the kinds are served and access is denied until the staff binding (infra) lands.Problem and outcome
Operators need to record two things about real servers in Fleet: where a server is planned to go, and which physical server is actually there. Recording either must not provision the server, publish capacity, or take ownership.
MachineCapacity.spec.deviceRefalready names aDevice, but the inventory kinds are only proposed (#63).This PR implements a minimal, operator-written subset of #63 in
fleet.datumapis.com/v1alpha1:DeviceClaim: the plan for one slot. It holds facility, rack, position, height and face; the expected model, with an optional serial because the serial is usually unknown at plan time; and expected ports, each with its expected cable peer (device + port). The slot outlives any one Device.Device: the actual asset, created by the registrar when detected hardware is bound to a claim. It holdsclaimRef(required, exactly one claim); identity (model, serial, SMBIOS system UUID, at least one of serial or UUID); an optional BMC endpoint; interfaces (name, MAC if known, observed peer);unmappedMACAddressesfor detected MACs that can't yet be attributed to a port; and provenance.Both kinds are operator-written, and neither has a controller. Registration authorizes no hardware effect and creates or changes no
MachineCapacity.statusis a reserved subresource with no fields and no writer; later only collectors and verifiers will write it, and never identity. Fleet has no knowledge of any external inventory system.This replaces the earlier
InventoryObservationdesign on this branch.Validation (CRD schema + CEL)
provenancerequiresmethod: Manual,recordedByandrecordedAt;referenceis optional and opaquerecordedAtclaimRefis required and immutableidentityis immutable, including adding a missing field; a hardware swap is a new Devicehttpswithout credentialsfrontorrearField limits keep the MAC-uniqueness rule within the API server's CEL cost budget. CEL cannot check that a referenced claim exists; until a registrar enforces it, operators create the claim first.
Relationship to #63
Names and writers match #63:
facility, notsite; Site is cluster placement policy.Omitted and deferred to #63: Facility, Rack, Cable and PowerFeed kinds (facility and rack are names, and expected peers are inline until Cable exists); plan acceptance and reservations; identity adjudication; the ledger; trust profiles and enrollment challenges; evidence; component lineage; maintenance and retirement; verification predicates; and role separation.
Divergence to resolve in #63. The agreed convention here is that a whole-server replacement binds a new Device to the same DeviceClaim. #63's current text says a replacement also creates a new DeviceClaim. The schema enforces neither convention; the ops doc records the divergence.
MachineCapacityis unchanged. The allocator keys an asset as<namespace>/fleet.datumapis.com/Device/<deviceRef.name>. Devices are objects in exactly that group and kind, so a later supply step can reference one by name if both objects share a namespace.Changes
internal/api/inventory/v1alpha1: types, scheme registration, deepcopy and CRD tests.config/inventory/fleet.datumapis.com.yaml: both CRDs, in an opt-in root. They carry no Milo discovery annotation, no production root references them, and CI renders the root.docs/operations/physical-inventory.mdcovers the model, validation, a synthetic example and what is deferred to docs: propose inventory lifecycle and trust #63. Status rows are updated in the architecture, development, operations and config guides.Verification
go vet ./...andgo test -race ./...pass.claimRef, serial (changed, removed or added), UUID and model;ci.ymlkustomize roots render. The synthetic-staging, overlay-isolation, standalone, Milovalidateand multiplane harness checks pass, and doc links pass.🤖 Generated with Claude Code