Skip to content

Let a holder report a network interface available to serve - #439

Merged
scotwells merged 1 commit into
mainfrom
feat/networkinterface-holder-contract
Sep 9, 2026
Merged

Let a holder report a network interface available to serve#439
scotwells merged 1 commit into
mainfrom
feat/networkinterface-holder-contract

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

A network interface reports whether its addresses are allocated and programmed, but nothing reports whether the workload behind it is ready to take traffic. This adds a condition that only the holder of an interface writes, which the operator seeds as unknown on creation and resets when a retained interface is unbound so a new holder never inherits a departed one's word. Each interface a cell binds is also stamped with the location that serves it, and a bounded set of claim labels is carried onto the interface and its project copy so a label selector can reach it. This is the first of a stack of six pull requests that split the network services prototype into reviewable pieces, and it stands on its own as the contract the compute operator writes to.

Test plan

  • Unit tests cover seeding the condition, resetting it on unbind, and refusing to reset a bound interface
  • Unit tests cover the location stamp and label propagation onto the interface and its projection
  • Build, vet, and the network interface controller tests pass under envtest
  • Full test suite and lint pass in CI

A network interface says whether its addresses are allocated and
programmed, but nothing says whether the thing behind it is ready to
take traffic. A service that load balances across interfaces needs that
answer from whatever holds the interface, and needs to know which
location each interface is served from.

Add a holder-owned condition that the operator only ever seeds Unknown
and resets when a retained interface is unbound, so a new holder never
inherits a departed holder's word. Stamp the serving location onto each
interface a cell binds and carry a bounded set of claim labels onto the
interface so a selector can reach it.

Key changes:
- Add the HolderAvailable condition and its reasons to NetworkInterface
- Seed it Unknown on create and take it back on unbind
- Stamp the location label on interfaces the cell binds
- Propagate selected claim labels onto the interface and its projection

@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.

Reviewed the holder contract and the label allow-list. The HolderAvailable reset on unbind and the propagation/removal paths look right, and the tests cover the settled-state no-op.

One thing I checked rather than asked about: release leaves the propagated compute.datumapis.com/* and location labels on a retained interface, which looked like it could let an unheld interface match a NetworkService selector. #441 rules that out by filtering members on Phase == Bound, so the labels persisting as slot identity is consistent.

@scotwells
scotwells merged commit c7821e7 into main Sep 9, 2026
13 checks passed
@scotwells
scotwells deleted the feat/networkinterface-holder-contract branch September 9, 2026 22:25
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.

2 participants