Skip to content

feat: Claim lab boot addresses from real IPAM - #218

Open
scotwells wants to merge 4 commits into
feat/manual-inventory-recordsfrom
feat/ipam-lab
Open

scotwells wants to merge 4 commits into
feat/manual-inventory-recordsfrom
feat/ipam-lab

Conversation

@scotwells

@scotwells scotwells commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

In its synchronized DHCP mode, the lab now takes boot addresses from the real IPAM service, served through the provider project's Milo API with its own lab database, in place of a stand-in. The DHCP check ties every address the site's DHCP handed out to IPAM's allocation for that operation's own claim, and requires every claim and allocation released at the end. The synchronized lab has not run yet, so IPAM's startup against the lab's Milo is unproven. Stacked on #216.

Related to #186

How it stays inactive

It is lab only. IPAM and its database start only when the lab runs with synchronized DHCP, which is off by default and which CI never selects, and no deployed configuration includes either. The lab gives IPAM a token only in that mode. One part reaches every lab run: the provider Milo now starts with the aggregation layer's front proxy, which static runs also get.

Decisions for a person

  • Milo marks a remote API available only from its controller-manager, which the lab does not run, so the lab marks IPAM available itself once it is ready. Running Milo's controller-manager in the lab is the alternative.
  • A full pool is proven by unit tests only. A lab phase would need a second class switched in mid-run.
  • The sampler reads IPAM's claim address and allocation names as the repository's client does; confirm them against the IPAM release the lab pins.

Test plan

  • Harness tests for the IPAM layer's inventory, pinned digests, Milo wiring and the evidence matching
  • Every gh pr checks entry green on the head, including the multi-plane acceptance
  • The static Redfish and local VM acceptance still pass with the front proxy
  • Synchronized Redfish acceptance with real IPAM, with every claim and allocation released

🤖 Generated with Claude Code

@scotwells
scotwells requested review from ecv and kevwilliams November 26, 2026 01:32
@scotwells
scotwells force-pushed the feat/ipam-claim-contract branch from ba109e0 to 20cbcec Compare November 26, 2026 03:43
@scotwells
scotwells force-pushed the feat/ipam-claim-contract branch from 20cbcec to b355e66 Compare November 28, 2026 23:23
@scotwells
scotwells force-pushed the feat/ipam-claim-contract branch from b355e66 to 6b2de4a Compare November 29, 2026 01:20
@scotwells
scotwells force-pushed the feat/ipam-claim-contract branch from 6b2de4a to ef820d6 Compare November 29, 2026 02:04
@scotwells
scotwells force-pushed the feat/ipam-claim-contract branch from ef820d6 to 33156b9 Compare November 29, 2026 02:15
@scotwells scotwells added the multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners label Nov 29, 2026
@scotwells
scotwells marked this pull request as ready for review November 29, 2026 02:59
@scotwells
scotwells requested a review from a team as a code owner November 29, 2026 02:59
@scotwells
scotwells removed the request for review from a team November 29, 2026 02:59

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve.

The lab now runs the real IPAM behind the provider project's Milo API with its own PostgreSQL, replacing the in-process stand-in. It is lab only and only with --synced-dhcp, which CI never selects. Everything IPAM-specific (token, class lab-provisioning, the 192.168.77.0/24 pool, APIService, NetworkPolicy, RBAC) lives in the provider project's lab Milo or the lab platform cluster, so lab claims cannot touch a non-lab pool.

  • The one change reaching every lab run is the front-proxy flags on the provider Milo (config/multiplane/milo/provider/kustomization.yaml). CI's acceptance (localvm, flux) and acceptance (redfish, flux) passed with it, which covers static runs. The generated CA and client key are 2-day, per-run and enrolled out of band, never in the source.
  • The IPAM token is added to the provider tokens only when synced and gets system:masters, like the bootstrap token. Acceptable for a throwaway lab Milo; keep it from being copied into any real config.
  • The lab marks the IPAM APIService Available itself by patching its status. If IPAM is not Ready the lab still passes that gate, so rely on the wait for ipclasses through the provider API that follows it. That wait is bounded at 300s.
  • The synced run has not executed (the PR says so), so IPAM's startup against the lab Milo and the sampler's field names (allocatedCIDR, boundAllocationRef, claimRef) are unproven against the pinned release. CI's harness check covers inventory and digests only.

Follow-ups:

  • Run the synced lab once before #225 builds on it, and record the result on #186.
  • A full pool is proven by unit tests only; a lab phase that shrinks the pool would prove the user-visible message end to end.

@scotwells
scotwells requested a review from ecv November 29, 2026 04:32

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still approved at f7d4685: nothing has changed since my last review.

scotwells and others added 4 commits November 29, 2026 00:48
In synchronized DHCP mode the multiplane Redfish lab now runs the real
IPAM service (milo-os/ipam v0.6.0, manifests and image pinned by digest)
on the platform cluster, aggregated by the provider project's Milo API,
with its own pinned PostgreSQL. Fleet adds no database. Quota is off
because the lab Milo serves no quota API. Bootstrap enrolls the
front-proxy, serving and database credentials at run time, registers the
APIService, and creates the lab-provisioning class and a pool that
allocates only 192.168.77.100-199.

The stand-in claim CRD and binder are gone from the lab path; envtests
keep their stand-in.

A background sampler records IPAM's claims and allocations for the whole
run, recording failed reads instead of stopping. The synced DHCP phase
ties every Kea lease to IPAM's allocation for that operation's own claim,
bridging a window IPAM could not be read only by the same allocation on
both sides, requires a recent last sample, and requires every claim and
allocation released and the pool back to its reservations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The provider Milo in every lab run held a cluster-admin token for IPAM,
which only synchronized DHCP runs. It now exists only there, and IPAM's
sampler starts only for the scenario groups that release a target.

The synchronized DHCP evidence also counts a Kea row that renews a live
lease as that lease, reads a claim's address from its single-host CIDR
when IPAM sets no address, and keys each boot window by its admission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A released lease no longer counts as live, so a later grant of the same
address and MAC is a new grant, not a renewal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells
scotwells force-pushed the feat/ipam-claim-contract branch from 33156b9 to 179e58a Compare November 29, 2026 07:18
@scotwells scotwells added multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners and removed multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners labels Nov 29, 2026
@scotwells
scotwells requested a review from ecv November 29, 2026 07:19

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve.

Rebase only: range-diff against my last review shows no change to this PR's commits.

@scotwells
scotwells requested a review from ecv November 29, 2026 09:06
Base automatically changed from feat/ipam-claim-contract to feat/manual-inventory-records November 29, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multiplane-acceptance Run the multiplane acceptance suites on GitHub-hosted runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants