Skip to content

[bgp] Support BGP confederation in update replication test#23131

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:bgp-update-replication-confed
Mar 20, 2026
Merged

[bgp] Support BGP confederation in update replication test#23131
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:bgp-update-replication-confed

Conversation

@bingwang-ms
Copy link
Copy Markdown
Collaborator

@bingwang-ms bingwang-ms commented Mar 19, 2026

Description of PR

Summary:
Improve tests/bgp/test_bgp_update_replication.py so the test can establish ExaBGP neighbors correctly on BGP confederation topologies.

Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

test_bgp_update_replication.py currently brings up BGP peers by using only minigraph_bgp_asn as the DUT-facing ASN. That works for regular topologies, but it does not work correctly when the DUT is running BGP confederation.

How did you do it?

  • read the confederation ASN from the DUT with get_bgp_confed_asn()
  • pass confed_asn into each BGPNeighbor
  • enable use_vtysh for FabricSpineRouter when confederation is enabled, matching the existing confed-aware pattern already used by nearby BGP tests
  • keep existing behavior unchanged for non-confederation topologies

How did you verify/test it?

  • python -m flake8 --max-line-length=120 tests\\bgp\\test_bgp_update_replication.py
  • python -m py_compile tests\\bgp\\test_bgp_update_replication.py
  • attempted python -m pytest --collect-only tests\\bgp\\test_bgp_update_replication.py -q, but collection is blocked in this Windows environment because repo test helpers import Linux-only fcntl

The change is also validated on a physical testbed

image

Any platform specific information?

This change is only relevant for confederation-enabled topologies, especially FT2 FabricSpineRouter cases that require the existing vtysh configuration path.

Supported testbed topology if it's a new test case?

Not a new test case.

Documentation

No documentation update is needed because this changes existing test setup logic only.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@StormLiangMS
Copy link
Copy Markdown
Collaborator

Code Review

LGTM — Correctly adds confed_asn and use_vtysh support for FabricSpineRouter when BGP confederation is enabled. Follows the existing confed-aware patterns used in nearby BGP tests. Clean, targeted change with physical testbed validation.

@bingwang-ms bingwang-ms merged commit bba5257 into sonic-net:master Mar 20, 2026
16 checks passed
@bingwang-ms bingwang-ms added Request for 202511 branch Request to backport a change to 202511 branch Approved for 202511 branch labels Mar 20, 2026
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Mar 20, 2026
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #23150

mssonicbld pushed a commit that referenced this pull request Mar 20, 2026
vrajeshe pushed a commit to vrajeshe/sonic-mgmt that referenced this pull request Mar 23, 2026
Signed-off-by: Bing Wang <[email protected]>
Signed-off-by: Venkata Gouri Rajesh Etla <[email protected]>
ravaliyel pushed a commit to ravaliyel/sonic-mgmt that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants