Skip to content

[test_bgp_peer_down.py] Enhance BGP peer shutdown test for new neighbor types - #26744

Closed
wenyiz2021 wants to merge 1 commit into
sonic-net:masterfrom
wenyiz2021:bgp_peer_shutdown
Closed

[test_bgp_peer_down.py] Enhance BGP peer shutdown test for new neighbor types#26744
wenyiz2021 wants to merge 1 commit into
sonic-net:masterfrom
wenyiz2021:bgp_peer_shutdown

Conversation

@wenyiz2021

@wenyiz2021 wenyiz2021 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This pull request updates the BGP peer shutdown test logic to correctly handle management aggregator devices that use BGP confederation. The main change ensures that when the device under test is a management aggregator, the test neighbor is treated as an external eBGP peer and is configured directly via vtysh.

BGP confederation handling improvements:

  • Updated common_setup_teardown in tests/bgp/test_bgp_peer_shutdown.py to recognize LowerMgmtAggregator and UpperMgmtAggregator device types, setting the neighbor type to MgmtSpineRouter and ensuring external eBGP peers are added via vtysh when confederation is present.

Description of PR

Summary:
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

  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605

Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:

Tested branch

  • master
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • N/A

Test result

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

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

Documentation

Added handling for LowerMgmtAggregator and UpperMgmtAggregator types in BGP peer shutdown test.
Copilot AI review requested due to automatic review settings August 3, 2026 19:07
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI 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.

Pull request overview

This PR updates tests/bgp/test_bgp_peer_shutdown.py to recognize management-aggregator DUT roles and adjust how the test neighbor is modeled/configured when BGP confederation is involved, aiming to ensure the shutdown behavior is validated correctly on these newer neighbor types.

Changes:

  • Extend common_setup_teardown DUT-type classification to include LowerMgmtAggregator and UpperMgmtAggregator.
  • Assign the neighbor type MgmtSpineRouter for these DUT types.
  • Enable configuring the test neighbor via vtysh (instead of CONFIG_DB) when a confederation ASN is present.

Comment on lines +82 to +86
# external eBGP peer, so it must be added directly to FRR via vtysh
# (the config_db path is not rendered for these peers).
neigh_type = "MgmtSpineRouter"
if confed_asn is not None:
use_vtysh = True
@wenyiz2021 wenyiz2021 changed the title [DMA] Enhance BGP peer shutdown test for new neighbor types [test_bgp_peer_down.py] Enhance BGP peer shutdown test for new neighbor types Aug 3, 2026
@wenyiz2021

Copy link
Copy Markdown
Contributor Author

adding in #26750 instead

@wenyiz2021 wenyiz2021 closed this Aug 3, 2026
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.

3 participants