Skip to content

Conversation

zeeshanlakhani
Copy link
Collaborator

@zeeshanlakhani zeeshanlakhani commented Sep 25, 2025

Note: Review IP Pool extensions first.

Introduces end-to-end multicast group support across control plane and sled-agent, integrated with IP pool extensions required for supporting multicast workflows. This work enables project-scoped multicast groups with lifecycle-driven dataplane programming and exposes an API for operating multicast groups over instances.

This currently points to #9084, which is needed for this to work.

Highlights:

  • DB: new multicast_group tables; member lifecycle management
  • API: multicast group/member CRUD; source IP validation; VPC/project hierarchy integration with default VNI fallback
  • Control plane: RPW reconcilers for groups/members; sagas for dataplane updates atomically at the group level; instance lifecycle hooks and piggybacking
  • Dataplane: Dendrite DPD switch programming via trait abstraction; DPD client used in tests
  • Sled agent: multicast-aware instance management; network interface configuration for multicast traffic; cross-version testing; OPTE stubs present
  • Tests: comprehensive integration suites under nexus/tests/integration_tests/multicast/

Components:

  • Database schema: external and underlay multicast groups; member/instance association tables
  • Control plane modules: multicast group management, member lifecycle, dataplane abstraction; RPW reconcilers to ensure convergence
  • API layer: endpoints and validation; default-VNI semantics when VPC not provided
  • Sled agent: OPTE stubs and compatibility shims for older agents

Workflows Implemented:

  1. Instance lifecycle integration:

    • "Create" -> resolve VPC/VNI (or default), validate source IPs, create memberships, enqueue group ensure RPW
    • "Start" -> program dataplane via ensure/update sagas; activate member flows after switch ack
    • "Stop" -> deactivate dataplane membership; retain DB membership for fast restart
    • "Delete" -> remove instance memberships; group deletion is explicit
    • "Migrate" -> deactivate on source sled; activate on target; idempotent with ordering guarantees
    • Restart/recovery -> RPWs reconcile desired state; compensations clean up partial programming
  2. RPW reconciliation:

    • ensure dataplane switches match database state
    • handle sled migrations and state transitions - Eventual consistency with retry logic

Migrations:

  • Apply schema changes in schema/crdb/multicast-group-support/up01.sql (and update dbinit.sql)
  • Bump schema versions accordingly

API/Compatibility:

  • OpenAPI updated: openapi/nexus.json, openapi/sled-agent/sled-agent-5.0.0-89f1f7.json
  • Contains a version change (to v5) as InstanceEnsureBody has been modified to
    include multicast_groups associated with an instance in the underlying sled config
  • Regenerate clients where applicable

References:

Follow-ups include:

  • OPTE integration
  • commtest extension
  • omdb commands are tracked in issues
  • pool and group stats

@zeeshanlakhani zeeshanlakhani changed the title Zl/mcast impl [feat] Multicast Group Support Sep 25, 2025
@zeeshanlakhani zeeshanlakhani changed the base branch from main to zl/ip-pool-multicast-support September 25, 2025 16:04
@zeeshanlakhani zeeshanlakhani self-assigned this Sep 25, 2025
@zeeshanlakhani zeeshanlakhani changed the title [feat] Multicast Group Support [feat, multicast] Multicast Group Support Sep 25, 2025
Introduces end-to-end multicast group support across control plane and sled-agent, integrated with IP pool extensions required
for supporting multicast workflows. This work enables project-scoped multicast groups with lifecycle-driven dataplane programming
and exposes an API for operating multicast groups over instances.

Highlights:
  - DB: new multicast_group tables; member lifecycle management
  - API: multicast group/member CRUD; source IP validation; VPC/project hierarchy integration with default VNI fallback
  - Control plane: RPW reconcilers for groups/members; sagas for dataplane updates atomically at the group level; instance lifecycle hooks and piggybacking
  - Dataplane: Dendrite DPD switch programming via trait abstraction; DPD client used in tests
  - Sled agent: multicast-aware instance management; network interface configuration for multicast traffic; cross-version testing; OPTE stubs present
  - Tests: comprehensive integration suites under nexus/tests/integration_tests/multicast/

Components:
  - Database schema: external and underlay multicast groups; member/instance association tables
  - Control plane modules: multicast group management, member lifecycle, dataplane abstraction; RPW reconcilers to ensure convergence
  - API layer: endpoints and validation; default-VNI semantics when VPC not provided
  - Sled agent: OPTE stubs and compatibility shims for older agents

Workflows Implemented:
  1. Instance lifecycle integration:

     - "Create" -> resolve VPC/VNI (or default), validate source IPs, create memberships, enqueue group ensure RPW
     - "Start" -> program dataplane via ensure/update sagas; activate member flows after switch ack
     - "Stop" -> deactivate dataplane membership; retain DB membership for fast restart
     - "Delete" -> remove instance memberships; group deletion is explicit
     - "Migrate" -> deactivate on source sled; activate on target; idempotent with ordering guarantees
     - Restart/recovery -> RPWs reconcile desired state; compensations clean up partial programming

  2. RPW reconciliation:

     - ensure dataplane switches match database state
     - handle sled migrations and state transitions
     - Eventual consistency with retry logic

Migrations:
  - Apply schema changes in schema/crdb/multicast-group-support/up01.sql (and update dbinit.sql)
  - Bump schema versions accordingly

API/Compatibility:
  - OpenAPI updated: openapi/nexus.json, openapi/sled-agent/sled-agent-5.0.0-89f1f7.json
  - Contains a version change (to v5) as InstanceEnsureBody has been modified to
    include multicast_groups associated with an instance in the
    underlying sled config
  - Regenerate clients where applicable

References:
  - RFD 488: https://rfd.shared.oxide.computer/rfd/488
  - IP Pool extensions: #9084
  - Dendrite PRs (based on recency):
    * oxidecomputer/dendrite#132
    * oxidecomputer/dendrite#109
    * oxidecomputer/dendrite#14

Follow-ups include:
  - OPTE integration
  - commtest extension
  - omdb commands are tracked in issues
  - pool and group stats
…sed on config

Being that we still have OPTE and Maghemite updates to come for statically routed multicast,
we gate RPW and Saga actions behind runtime configuration ("on" for tests). API calls
are tagged "experimental."
@zeeshanlakhani
Copy link
Collaborator Author

@internet-diglett, others, I added "feature-gating" to this PR, as well as "experimental" tagging for the new entrypoints.

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