Skip to content

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

Description

@chet

After the three writer PRs land, startup must prove that retained prefixes and routing relationships are safe before listeners or controllers can serve them. This is also the right final point to audit every writer that can expand routing visibility and close any remaining concurrency gap without introducing another monolith.

Scope

  • Compose the prefix, route policy, and retained Instance checks 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²) comparison of every address pair.
  • Run the retained state audit using the same transaction lock introduced by Enforce overlap admission for prefix-bearing writes #5113.
  • Audit every current writer that can expand routing visibility and prove each participates before Install scoped prefix constraints while global exclusions remain #3891 merges.
  • When the gate is disabled, reject expansion while preserving reads and safe contraction/drain.
  • Extract a shared module later only if the landed caller code has useful duplication.

Acceptance criteria

  • Startup rejects retained direct, peer, sibling, policy, or Instance overlap that would be unsafe.
  • Legacy Admin startup reconciliation remains compatible.
  • Concurrent prefix and policy changes, and concurrent prefix and Instance changes, cannot both pass by reading stale state.
  • All current writers that can expand routing visibility are enumerated and covered by handler tests.
  • No external work occurs while the transaction lock is held.
  • The retained state audit and 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