Skip to content

[Dependent on PR#21335] Feature/bgp flap high bgp phase 2#21415

Closed
PriyanshTratiya wants to merge 12 commits intosonic-net:masterfrom
PriyanshTratiya:feature/bgp-flap-high-bgp-phase-2
Closed

[Dependent on PR#21335] Feature/bgp flap high bgp phase 2#21415
PriyanshTratiya wants to merge 12 commits intosonic-net:masterfrom
PriyanshTratiya:feature/bgp-flap-high-bgp-phase-2

Conversation

@PriyanshTratiya
Copy link
Copy Markdown
Contributor

@PriyanshTratiya PriyanshTratiya commented Nov 25, 2025

Description of PR

Summary:
Fixes # (issue)

This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR #21335. It introduces new test cases and utilities to exercise BGP IPv6 convergence and scale behavior under repeated admin shutdown/startup (“flap”) scenarios for BGP sessions and interfaces.

Key Points:

  • Implements new high‑scale BGP admin flap test cases reusing the generalized connection‑handling logic introduced in PR Refactoring/high bgp phase 2 #21335.
  • Adds parameterized flows to flap:
    • Individual BGP sessions,
    • Subsets of ports,
    • All ports/sessions, at scale.
  • Extends helper methods to:
    • Drive repeated admin shut/no‑shut cycles,
    • Measure convergence and recovery time after each flap,
    • Validate BGP IPv6 routes and neighbor states remain stable after repeated flaps.
  • Integrates the new flap scenarios with existing BGP IPv6 convergence and scale tests, keeping configuration and connection behaviors consistent with the refactored framework.
  • Improves logging and per‑iteration reporting for easier debugging of failures during long‑running flap cycles.

Dependency:

  • Functionally depends on the refactoring from PR #21335. The helper methods and parameters introduced there are used here for BGP admin flap scenarios.

Type of change

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

Back port request

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

Approach

What is the motivation for this PR?

To validate BGP IPv6 convergence and stability under high‑scale and repeated admin flap scenarios, we want dedicated test coverage for:

  • Repeated shut/no‑shut of BGP neighbors and interfaces at scale,
  • Ensuring routes re‑converge within expected bounds,
  • Detecting potential regressions in control‑plane stability and convergence times when links or sessions are frequently toggled.

How did you do it?

  • Added new BGP flap test flows in tests/bgp/test_ipv6_bgp_scale.py (and related helpers) that:
    • Use the refactored connection control APIs (shutdown_connections, connection_type, shutdown_all_connections, etc.) to drive admin flaps.
    • Allow configuration of:
      • Number of flap iterations,
      • Target connection type (session vs. port, subset vs. all),
      • Wait times between flap and verification.
    • After each flap cycle, verify:
      • BGP sessions return to Established,
      • Expected IPv6 routes are fully present,
      • No unexpected route loss or long‑term neighbor instability.
  • Reused/refined existing helper functions for command execution, logging, and validation so that the flap tests share as much code as possible with the convergence/scale tests added.
  • Kept the test logic parameter‑driven to make future extensions (e.g., different neighbor sets, different topologies) straightforward.

How did you verify/test it?

  • Ran the new BGP flap tests on:
    • t0-isolated-d2u510s2 topology
    • Platform: Broadcom Arista-7060X6-64PE-B-C512S2
  • Verified:
    • BGP sessions recover to Established after each flap iteration,
    • IPv6 routes re‑converge as expected,
    • No persistent errors or unexpected failures in the test logs.

Any platform specific information?

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

Documentation

#21437

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@PriyanshTratiya PriyanshTratiya requested a review from r12f November 25, 2025 01:11
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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