Skip to content

feat: add Neutron Dynamic Routing to the network-agents snap - #46

Open
gboutry wants to merge 3 commits into
canonical:mainfrom
gboutry:feat/ndr
Open

gboutry wants to merge 3 commits into
canonical:mainfrom
gboutry:feat/ndr

Conversation

@gboutry

@gboutry gboutry commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Package the Neutron Dynamic Routing (NDR) agent so Sunbeam can run a BGP speaker per node and routing domain. NDR is opt-in and runs under a shared Pebble supervisor, with separate configuration and state for each agent.

The snap supports dedicated uplinks and tagged OVS ports on provider trunks. The paired network-agents charm asks the snap to prepare protected ports before applying Netplan. The snap starts agents only after their peering addresses are ready. If an uplink disappears, it pauses the affected agent. If AMQP credentials are removed, it stops the agents and retains placement for recovery.

Assisted-By: Codex (gpt-6)

QA steps

  1. Run tox -e unit,mypy,pep8. All 94 snap unit tests passed, along with mypy and lint. The paired charm passed 49 unit tests.
  2. Build the snap from this branch and deploy it with the paired charm, MicroOVN, and plaintext RabbitMQ. Verify port preparation, route advertisement and withdrawal, and agent recovery after Pebble restarts.
  3. Remove one uplink while two peers are established. Verify that the affected routes withdraw and the healthy peer stays up. Restore the uplink and verify that its routes return.

A repacked QA snap passed the snapd rollback and stale-socket cleanup checks. A separate test with real Pebble verified recovery from an interrupted layer write. The branch build and live BGP checks above are pending.

Links

Jira card: OPEN-4984

@gboutry
gboutry force-pushed the feat/ndr branch 3 times, most recently from b02b1c8 to cd3f56c Compare November 25, 2026 10:48
Stage the DR agent and shared Pebble supervisor. Use the published
NDR placement contract to validate configuration. Render private
agent config from a packaged Jinja template and recover interrupted
updates from saved and live services. Expose rotating per-agent logs
through a read-only snap content slot.

Stage Hibiscus packages from the updates pocket.

Assisted-By: Codex (gpt-6.2-sol)
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
Resolve typed attachment options against live OVS and kernel state.
Install nftables protection before creating managed access ports and
verify protection before starting a peering agent.

Assisted-By: Codex (gpt-6.2-sol)
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
Validate pending settings before applying OVN changes. Schedule the
watcher after OVN configuration succeeds and reconcile committed
placement under a lock. Restore missing managed ports, and stop
agents before removing their host protection.

Recover abandoned Pebble sockets and quarantine invalid NDR layers
so the watcher can rebuild from committed placement. Stop an
NDR-only supervisor on explicit disable and preserve shared
workloads.

Expose the v1 validation response using the shared contract. Cover
placement validation, supervisor recovery, and cleanup with tests.

Assisted-By: Codex (gpt-6.2-sol)
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
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