Skip to content

[multicast] Complete multicast background reconciliation and designated-forwarder election - #11128

Open
zeeshanlakhani wants to merge 11 commits into
zl/mcast-e2e-commtestfrom
zl/mcast-build
Open

[multicast] Complete multicast background reconciliation and designated-forwarder election#11128
zeeshanlakhani wants to merge 11 commits into
zl/mcast-e2e-commtestfrom
zl/mcast-build

Conversation

@zeeshanlakhani

@zeeshanlakhani zeeshanlakhani commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Nexus now elects and reconciles a single external forwarder per multicast group while continuing to rely on the existing DDM/mg-lower ownership of underlay membership origination and propagation.

This includes:

  • Integrating dataplane reconciliation with the existing DDM/mg-lower underlay membership model; Nexus does not write rear-port membership.
  • Electing and observing a designated external forwarder so multicast ingress occurs on exactly one switch.
  • Reconciling DPD placement, source filters, NAT targets, VNIs, multicast MACs, VLAN state, and underlay presence.
  • Adding drift telemetry for misplaced entries and group re-elections.
  • Making member-attachment source-union enforcement atomic and safe for idempotent reattaches and source rewrites.
  • Preserving source-filter semantics across ASM/SSM transitions, including any-source aggregation.
  • Validating probe multicast memberships at creation, rejecting unsupported IPv6 joins, and rolling back implicitly created groups on failed requests.
  • Simplifying documentation and consolidating test coverage to reduce redundancy.

…ation via DDM

Designated-forwarder election places a group's external NAT entry on a
single switch chosen by group-UUID hash, so external multicast ingresses
exactly once. The sled-agent `DdmReconciler` gains a multicast-origin arm
that originates underlay member prefixes, with advertise/withdraw
methods in ddm-admin-client.

`PortManager` exposes the subscription set and a change notification for
that reconciler, and Nexus dataplane and member background tasks pick up
the elected-switch plumbing.
…esh fixes

Sled-agent:

- The `instance_manager` awaits every instance's external-IP refresh and
  folds per-instance errors instead of stopping directly at the first
  one, so one failed refresh does not leave remaining ports on stale IGW
  keying.
- `refresh_external_ips_inner` treats an instance without a primary NIC
  as a successful no-op. Such an instance has no OPTE port to refresh,
  and propagating a `NoPrimaryNic` error would permanently fail
  `set_eip_gateways` for the whole sled. Note: A regression test
  registers a NIC-less instance and asserts the sled-wide refresh
  succeeds.

Nexus:

- `member_attach`'s source-union cap check skips members already in a
  non-"Left" state, so a repeat reattach cannot trip the cap.
- The VPC IGW mapping query for sled firewall resolution returns probe
  NIC mappings for probes on that sled.
- Reconciler drift telemetry: `entries_misplaced` and `groups_reelected`
  counters flow through the background status and omdb.
- `update_groups` keys DPD updates on the immutable DB tag rather than
  a rename parameter.
…erage

- `ip_pools`: rewrite multicast range validation as a table-driven test
  with an `Expect::{Ok, Reject}` case list, adding IPv6 coverage
  (ff02::/16 rejected, ff05::/16 accepted) alongside the v4
  reserved-range cases.
- omdb: fold the pools test into test_omdb_multicast_commands, which
  exercises pools, groups, members, and info against one setup.
- multicast integration tests cleanup and consolidation.
…::/12

`is_ssm_address` checks the sixteen per-scope ff3x::/32 blocks
(`IPV6_SSM_SUBNETS`), but several comments and doc strings described
the IPv6 range as the broader ff30::/12 prefix. Align them: the
`is_ssm_address` doc cites RFC 4607 for IPv4 232.0.0.0/8 and points
at `IPV6_SSM_SUBNETS` for the v6 blocks, and the datastore and
join-endpoint docs follow the same framing.

Doc-string changes in nexus-external-api flow into the generated
OpenAPI documents, so the three non-blessed nexus specs and the
latest pointer are regenerated.
…te fixes

This includes:

- `MulticastDataplaneClient::new` takes only (resolver, log) again,
  reverting the DB switch-table completeness check. The switch table
  has no writer, so the DNS-derived client map is authoritative. An
  empty map makes the pass skip and retry rather than fail against a
  stale denominator.
- `remove_groups` fails when the client map is empty or Dendrite
  discovery was partial instead of succeeding vacuously, so cleanup
  cannot delete DB rows while switch entries may remain intact.
- Warn when fewer DPD switches report slots than DNS advertised,
  tolerating a partial slot map.
- The external drift check returns early when the incumbent fetch
  errors rather than falling through to the hash election. Electing
  without an observed owner could move ownership off an unobserved
  switch and leave both switches replicating the group's traffic.
- The drift check also compares DPD forwarding state (NAT target,
  VLAN) against what Nexus programs, alongside tag and sources.
- Probe create rejects IPv6 multicast memberships in every request
  form and defaults the by-name auto-create pool hint to V4, since
  the in-zone joiner cannot pin an IPv6 interface scope yet. A
  rejected spec or failed probe creation rolls back any group
  implicitly created during resolution.
- Assorted doc and test cleanup.
@zeeshanlakhani zeeshanlakhani changed the title Finish out multicast background reconciliation and dataplane ownership around DNS-discovered Dendrite switches Complete multicast background reconciliation and designated-forwarder election Aug 21, 2026
@zeeshanlakhani zeeshanlakhani changed the title Complete multicast background reconciliation and designated-forwarder election [multicast] Complete multicast background reconciliation and designated-forwarder election Aug 21, 2026
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.

1 participant