Repository navigation
fix(custody): Wait out IPAM outages and report full boot pools - #216
Conversation
e7c530d to
c72a856
Compare
ba109e0 to
20cbcec
Compare
6bc39b4 to
ff91454
Compare
20cbcec to
b355e66
Compare
ff91454 to
f417f2d
Compare
b355e66 to
6b2de4a
Compare
f417f2d to
ce8b479
Compare
6b2de4a to
ef820d6
Compare
ef820d6 to
33156b9
Compare
ecv
left a comment
There was a problem hiding this comment.
Approve.
An IPAM outage now keeps an operation Pending and re-checked instead of admitting or failing it, and a full pool or refused claim surfaces IPAM's reason with no operation created. Inert today: no config sets a boot address class and the new IPAM read grant sits in the opt-in requester role no overlay includes. I mutated the claim-retention guard (deletes) and the verified-release check (unallocated forced true) in internal/bootaddress, and each failed its test (TestARetainingClaimIsNeverUsed, TestReleaseIsVerifiedAndAnUnknownOutcomeKeepsTheAddressHeld). Disabling the Retry branch in coordinator.go also failed TestAdmissionPreconditions (no requeue on an undecided check).
- The outage wait is unbounded and fixed at 5s (
undecidedRetry, coordinator.go): only staff operations expire, so a customer-path operation waits forever, and a missingipallocations/ipclaimsgrant looks the same as an outage and re-checks every 5s per operation. Cap it or back off, and surface a long wait (the PR already lists this as a decision, so not a hold). Releaselists every IPAllocation in the namespace per call to find one claim. Fine at lab scale; select by claim name when the pool is real.Releasedeletes with no UID precondition (IPAM ignores them), so the name plus the operation and kind labels is the only guard against deleting another claim.Releasedoes not check the allocation label whileClaimdoes; check it too.
Follow-ups:
- An allocation that outlives its claim stays unverified until a person removes it, with nothing but the release error to say so. Add an alert or condition before this is selected anywhere.
- Fleet-side claim lifetime and physical-server labels are left open; decide before the first real site.
IPAM reports a racing create of the same claim as a 409 Conflict with a ClaimExists cause, so the requester now reads the existing claim instead of failing. A full pool (507, Exhausted) is reported as ErrExhausted and other refusals (400, 409, 422) as ErrRefused; neither creates an operation. Fleet uses a claim only if IPAM stored it with reclaim policy Delete, which overrides the class's, so the claim's deletion removes its allocation in the same transaction. IPAM ignores delete preconditions. Release now counts only once a read finds the claim gone and no IPAllocation names it; a failed delete keeps the address held. At admission, a claim read that fails for any reason but the claim's absence leaves the operation Pending and requeues it, instead of failing it. This holds for every creator; a staff operation is still cancelled by staff expiry if it is never admitted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release whose delete removed the claim while an IPAM allocation still named it reached the allocation check with no test, so replacing that check left every test passing. A test now holds such a release unverified. An admission waiting out an IPAM outage also names the read error, so an operator can tell an outage from a missing grant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
283073c to
5617a92
Compare
33156b9 to
179e58a
Compare
ecv
left a comment
There was a problem hiding this comment.
Approve.
Rebase onto the merged power stack. The new Refusal.Retry now sits beside the base's Refusal.Wait, and decide checks Retry first, so an undecided check stays Pending and is never admitted or timed out by the queue wait. The coordinator role conflict resolves to include devicepoweroperations/status. Intent unchanged.
Boot address claims now follow the contract IPAM implements. A full pool or a refused claim is reported with IPAM's reason and creates no operation, and a release counts only once the claim is gone and IPAM no longer holds its address. When IPAM can't be read at admission, an installation or wipe waits and is checked again instead of failing. Stacked on #197, and must land before #218; #198 is a sibling with no overlap.
Related to #186
How it stays inactive
It changes only operations that carry a boot address, and nothing gives them one: no binary or configuration sets a boot address class. The new permission, reading IPAM's allocations to confirm a release, goes into the opt-in boot address requester role, which no overlay includes.
Decisions for a person
Test plan
gh pr checksentry green on the head, including the multi-plane acceptance🤖 Generated with Claude Code