bgp: enable lma/uma topologies for bgp tests - #26750
Conversation
- Add 'lma'/'uma' topology markers to Tier 2 BGP tests so they run on the single-node mgmt-aggregator testbeds. - test_bgp_peer_shutdown: add Lower/UpperMgmtAggregator branch that adds the test neighbor to FRR via vtysh when running under BGP confederation.
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Enable running existing BGP/FRR test coverage on single-node management-aggregator topologies by expanding pytest topology markers and adjusting BGP neighbor setup logic for mgmt-aggregator DUT roles.
Changes:
- Add
lma/umato pytest topology markers across multiple BGP/FRR test modules. - Extend
test_bgp_peer_shutdownsetup logic to handleLowerMgmtAggregator/UpperMgmtAggregatorDUT types (including vtysh-based neighbor configuration under confederation).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/bgp/test_frr_config_check.py | Allow FRR config checks/stress to run on lma/uma by expanding topology markers. |
| tests/bgp/test_bgp_update_replication.py | Expand supported topologies to include lma/uma. |
| tests/bgp/test_bgp_stress_link_flap.py | Expand supported topologies to include lma/uma. |
| tests/bgp/test_bgp_session.py | Expand supported topologies to include lma/uma. |
| tests/bgp/test_bgp_session_flap.py | Expand supported topologies to include lma/uma. |
| tests/bgp/test_bgp_peer_shutdown.py | Expand supported topologies to include lma/uma and add mgmt-aggregator DUT-type handling for neighbor setup. |
| tests/bgp/test_bgp_command.py | Expand supported topologies to include lma/uma. |
|
Reviewed together with #26639, #26723, #26724 and #26742 as one dependency chain. The marker additions themselves look right, but there are two things worth resolving before this merges. 1.
|
dut_type |
#26724 (test_bgp_update_timer.py) |
this PR (test_bgp_peer_shutdown.py) |
|---|---|---|
LowerMgmtAggregator |
MgmtSpineRouter |
MgmtSpineRouter |
UpperMgmtAggregator |
LowerMgmtAggregator |
MgmtSpineRouter |
Which one is right depends on #26742: as that PR stands today topo_uma.yml sets no device_type, so its LMA neighbors actually render as MgmtSpineRouter (the 'MA' in dev branch in minigraph_png.j2 — details in my comment there), which would make this PR accidentally correct and #26724 wrong. If topo_uma.yml is fixed to declare device_type: LowerMgmtAggregator, it flips and #26724 becomes the correct one.
Either way the two PRs shouldn't land with different mappings. Worth settling #26742 first, then aligning both.
While doing that: this dut_type → neigh_type chain now exists in three copies (test_bgp_update_timer.py, test_bgp_peer_shutdown.py, and the setup in tests/bgp/conftest.py). Pulling it into a single helper in bgp_helpers.py would stop this from diverging again.
3. Comment is inaccurate
# Mgmt aggregators run BGP confederation. The test neighbor is an
# external eBGP peer, so it must be added directly to FRR via vtyshThe M2 neighbors in topo_lma.yml are peer_in_bgp_confed: true with an ASN equal to the DUT's dut_confed_peers — they're confederation peers, not external eBGP. The vtysh part is right; suggest rewording to say the neighbor must be configured through vtysh on confederation topologies (which is the same reason the existing FabricSpineRouter / LowerRegionalHub / UpperRegionalHub branches do it).
Verified — no action needed
I checked all seven tests getting the new marker for uses of NEIGHBOR_MAP, get_eth_port, get_vm_offset, get_upstream_ptf_intfs and bgp_allow_list_setup; only test_bgp_stress_link_flap is affected (via get_upstream_neigh_type, item 1 above). The rest are clean.
PR description
Template is unfilled — no "Type of change" checked and no test result. Since this widens coverage to a new topology, the results from an actual lma and uma run would be the useful part here.
|
This PR has backport request label(s) for branch(es): msft-202603, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202603: <test result>) in the Test result section as well in your PR description. ---Powered by SONiC BuildBot
|
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
This PR is approved for branch msft-202603. No cherry pick PR has been created because of code conflict. @wenyiz2021, please manually create the cherry pick PR. ---Powered by SONiC BuildBot
|
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:
Tested branch
Test result
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
run on both lma and uma topology
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation