Skip to content

fix (DPU-agent): make BgpPeeringRouteServer redundancy aware - #4708

Open
hatamzad-nv wants to merge 4 commits into
NVIDIA:mainfrom
hatamzad-nv:fix/4113-route-server-redundancy
Open

fix (DPU-agent): make BgpPeeringRouteServer redundancy aware#4708
hatamzad-nv wants to merge 4 commits into
NVIDIA:mainfrom
hatamzad-nv:fix/4113-route-server-redundancy

Conversation

@hatamzad-nv

@hatamzad-nv hatamzad-nv commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Our route servers are redundant and all advertise the same EVPN routes, so losing one doesn't actually affect the DPU's routing. But NICo doesn't account for this, and if one route server has an issue, it raises a BgpPeeringRouteServer health alert that falls under PreventAllocations and PreventHostStateChanges. That reduces the site's capacity and blocks host operations.

Instead, we should track how many route servers have failed. When redundancy is truly gone, either a single route server being down or all of them failing, NICo raises the full health alert and marks the machines unhealthy.

Fixes #4113

Related issues

Fixes #4113

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Four new rows in the existing table-driven verify_bgp_summary_emits_expected_alerts
test, backed by three new fixtures:

  • 3 configured, 1 down → warning, no classifications
  • 3 configured, 2 down → critical
  • 2 configured, 1 down → critical
  • 4 configured, 1 down + 1 session absent from the peer data → both warnings,
    covering the missing-session path under redundancy

The existing single-route-server-down row still expects a critical alert, so the no-redundancy behaviour stays regression covered.

cargo test -p carbide-agent --lib health::bgp

Our route servers are redundant and all advertise the same EVPN routes, so losing one doesn't actually affect the DPU's routing. But NICo doesn't account for this, and if one route server has an issue, it raises a BgpPeeringRouteServer health alert that falls under PreventAllocations and PreventHostStateChanges. That reduces the site's capacity and blocks host operations.

Instead, we should track how many route servers have failed. When redundancy is truly gone, either a single route server being down or all of them failing, NICo raises the full health alert and marks the machines unhealthy.

Fixes NVIDIA#4113
@hatamzad-nv
hatamzad-nv requested review from a team and polarweasel as code owners August 7, 2026 17:47
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 94e97522-c01d-42a6-b023-d46dbb5bc56a

📥 Commits

Reviewing files that changed from the base of the PR and between bcf9374 and 36ce39d.

📒 Files selected for processing (1)
  • docs/architecture/health/health_probe_ids.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/architecture/health/health_probe_ids.md

Summary by CodeRabbit

  • New Features

    • Improved BGP route-server health monitoring for redundant configurations.
    • Route-server alerts are critical when fewer than two healthy sessions remain and warning-level when redundancy is maintained.
    • Added health assessment for IPv4 unicast and EVPN peers across varied route-server scenarios.
  • Bug Fixes

    • Added coverage for multiple route-server failures and missing sessions.
  • Documentation

    • Clarified route-server health classifications and allocation protections.

Walkthrough

BGP route-server health checks now account for redundancy. The health data records configured sessions, and alerts become critical only when fewer than two healthy route servers remain. New fixtures, tests, and documentation cover failure and missing-session scenarios.

Changes

BGP route-server health

Layer / File(s) Summary
Track route-server redundancy
crates/agent/src/health/bgp.rs
Defines the minimum healthy route-server threshold and stores the configured route-server count in BgpHealthData.
Classify failures and validate scenarios
crates/agent/src/health/bgp.rs, crates/agent/src/hbn_bgp_summary_*.json, docs/architecture/health/health_probe_ids.md
Classifies alerts from remaining healthy sessions. Fixtures and tests cover one-of-three, two-of-three, one-of-two, and missing-session cases. Documentation records the classification rules.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant BgpSummary
  participant BgpHealthEvaluator
  participant RouteServerAlert
  BgpSummary->>BgpHealthEvaluator: provide configured and session-state data
  BgpHealthEvaluator->>BgpHealthEvaluator: calculate healthy route servers
  BgpHealthEvaluator->>RouteServerAlert: classify route-server alert
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: making BgpPeeringRouteServer health handling aware of route-server redundancy.
Description check ✅ Passed The description explains the redundancy issue, the intended alert behavior, the tests, and the linked issue.
Linked Issues check ✅ Passed The changes satisfy issue #4113 by preserving warnings during partial availability and raising critical health alerts when redundancy is lost.
Out of Scope Changes check ✅ Passed The fixtures, BGP health logic, unit tests, and documentation directly support the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/health/health_probe_ids.md`:
- Line 87: Update the route-server alert description in the health probe
documentation: capitalize “With,” define a healthy session as one whose state
equals "Established," state that every missing or non-"Established" configured
peer emits an alert, and specify that PreventAllocations and
PreventHostStateChanges apply only when fewer than two sessions are healthy.
Reconcile related Markdown, run rumdl, and inspect the rendered page.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c0f5dec9-84fa-483e-9265-6f097d559d09

📥 Commits

Reviewing files that changed from the base of the PR and between 9cc6a20 and 0e7b50f.

📒 Files selected for processing (5)
  • crates/agent/src/hbn_bgp_summary_with_route_servers_one_failed.json
  • crates/agent/src/hbn_bgp_summary_with_route_servers_two_failed.json
  • crates/agent/src/hbn_bgp_summary_with_two_route_servers_one_failed.json
  • crates/agent/src/health/bgp.rs
  • docs/architecture/health/health_probe_ids.md

Comment thread docs/architecture/health/health_probe_ids.md Outdated
@hatamzad-nv
hatamzad-nv requested review from pdmack and removed request for pdmack August 7, 2026 20:11
@Matthias247

Copy link
Copy Markdown
Contributor

I think there is reason it was built that way. At least in the pre-FNN world there were still issues when one route server that was supposed to be there was not responding. Maybe with FNN it changed. @bcavnvidia might know more.

@polarweasel polarweasel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of little changes, then good to go

Comment thread docs/architecture/health/health_probe_ids.md Outdated

@polarweasel polarweasel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to have the paragraph break, but if you really don't want it, good enough...

@chet chet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So unless we changed something, and I'll need to dig into this, the route servers don't peer with each other, and have completely independent tables.

The scenario here is:

DPU-A peers with RS1 + RS2.
DPU-B peers with RS2 + RS3.

If RS2 fails, DPU-A and DPU-B cannot see eachother.

We therefore have to have monitoring at all times to make sure all DPUs share the same subset of route server connections (at least one common route server connection).

If configured_route_servers is not all route servers, then we indeed set ourselves up for a partitioning risk.

I put up a design doc about enhancing/revamping our route server architecture back in August 2025, and that turned into a meeting with the network team.

The outcome of the network team meeting was that we'd get rid of our route servers entirely, and instead lean on existing TOR peering (which gives us built in redundancy thanks to each PF on the DPU) with the network team to distribute routes for us. They already had/have BGP EVPN plumbing in place down to the leaves for other reasons, and said they could take on our load.

THAT said, I don't think anything came of it, or did it @bcavnvidia?

If not, I actually think we'll want to revive the route server design doc. I actually had an MVP/PoC tested for it, and it would give us what we want in terms of redundancy, and THEN we could say that 1 route server being up is "safe".

All said, I'll double check with @bcavnvidia to see if anything changed between now and then.

Fwiw, thanks for this PR! I know you had no clue about any of the history -- good to capture it here!

cc @Matthias247

@bcavnvidia

bcavnvidia commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

So unless we changed something, and I'll need to dig into this, the route servers don't peer with each other, and have completely independent tables.

...
THAT said, I don't think anything came of it, or did it @bcavnvidia?

If not, I actually think we'll want to revive the route server design doc. I actually had an MVP/PoC tested for it, and it would give us what we want in terms of redundancy, and THEN we could say that 1 route server being up is "safe".

cc @Matthias247

the route servers don't peer with each other

Correct

The outcome of the ... meeting was that we'd get rid of our route servers entirely, and instead lean on existing TOR peering

Also correct, and we've been switching off route-servers internally.

@chet

chet commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

So unless we changed something, and I'll need to dig into this, the route servers don't peer with each other, and have completely independent tables.
...
THAT said, I don't think anything came of it, or did it @bcavnvidia?
If not, I actually think we'll want to revive the route server design doc. I actually had an MVP/PoC tested for it, and it would give us what we want in terms of redundancy, and THEN we could say that 1 route server being up is "safe".
cc @Matthias247

the route servers don't peer with each other

Correct

The outcome of the ... meeting was that we'd get rid of our route servers entirely, and instead lean on existing TOR peering

Also correct, and we've been switching off route-servers internally.

Got it, okay, so that leaves us with:

  • We've been switching off route-servers internally, and the network team discussion started playing out.
  • The old route-server implementation is still subject to the same architectural issues it had, so we can either leave as-is (and I don't think this PR will actually do what we think it will), or if we want to improve the situation for people who want to deploy route-servers with minimal work, we should probably improve things wrt redundancy, and maybe bring back that design doc.

It doesn't affect our sites, since we're moving away from them, but for people who do their own deployments with them, the architecture as-is doesn't work, and they would need to do their own adjustments.

And fwiw @hatamzad-nv, if/once we DO actually fix the architecture, then yes, this PR is good!

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.

bug: route server health checking is too stringent causing unnecessary drop in allocatable capacity

5 participants