Skip to content

Audit retained routing safety at startup and close admission coverage #5116

Description

@chet

After the three writer-adoption PRs land, startup must prove that the retained routing graph is safe before listeners or controllers can serve it. This is also the right final point to audit every expansion writer and close any cross-writer concurrency gap without introducing another monolith.

Scope

  • Compose the prefix, route-policy, and retained-instance admission contracts after seeding and Admin-VPC reconciliation and before listeners/controllers start, including listen_only.
  • Add a focused retained-state audit using targeted SQL/DAO queries rather than an O(n²) all-address pair scan.
  • Run the retained-state audit under the same routing-admission lock used by writers.
  • Audit every current routing-expanding writer and prove each participates before Install scoped prefix constraints while global exclusions remain #3891 merges.
  • Keep gate-off behavior fail-closed for expansion while preserving reads and safe contraction/drain.
  • Leave shared-module extraction for a follow-up only if the landed call-site code has obvious duplication.

Acceptance criteria

  • Startup rejects retained direct, peer, sibling, policy, or instance overlap that would be unsafe.
  • Legacy Admin startup reconciliation remains compatible.
  • Prefix-vs-policy and prefix-vs-instance concurrent expansion cannot both pass stale state.
  • All current expansion writers are enumerated and covered by handler-level tests.
  • No external work occurs while the transaction lock is held.
  • The retained-state audit and cross-writer concurrency tests pass without enabling duplicate persistence.

Out of scope

Dependencies

Reference implementation and test corpus: #4940. Part of #3890 and #3883.

Metadata

Metadata

Assignees

Labels

networkingaffects DPU networking systems (EVPN, BGP, HBN, OVS)securityThings affecting host security (attestation, santization, etc)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions