Skip to content

feature/bgp sessions admin flap test#21520

Merged
bingwang-ms merged 5 commits intosonic-net:masterfrom
PriyanshTratiya:feature/bgp-flap-phase-2
Jan 12, 2026
Merged

feature/bgp sessions admin flap test#21520
bingwang-ms merged 5 commits intosonic-net:masterfrom
PriyanshTratiya:feature/bgp-flap-phase-2

Conversation

@PriyanshTratiya
Copy link
Copy Markdown
Contributor

@PriyanshTratiya PriyanshTratiya commented Dec 3, 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 #21335.
  • Adds parameterized flows to flap:
    • Individual BGP sessions,
    • 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.

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

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@PriyanshTratiya PriyanshTratiya changed the title Feature/bgp flap phase 2 feature/bgp sessions admin flap test Dec 4, 2025
@r12f r12f mentioned this pull request Dec 4, 2025
10 tasks
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@github-actions github-actions bot requested review from cyw233 and sanjair-git January 9, 2026 11:45
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms bingwang-ms merged commit a4e2ecc into sonic-net:master Jan 12, 2026
21 checks passed
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
yifan-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Jan 14, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
Signed-off-by: YiFan Wang <[email protected]>
PriyanshTratiya added a commit to PriyanshTratiya/sonic-mgmt that referenced this pull request Jan 21, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
AndoniSanguesa pushed a commit to AndoniSanguesa/sonic-mgmt that referenced this pull request Jan 21, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
Signed-off-by: Andoni Sanguesa <[email protected]>
AndoniSanguesa pushed a commit to AndoniSanguesa/sonic-mgmt that referenced this pull request Jan 21, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
Signed-off-by: Andoni Sanguesa <[email protected]>
@PriyanshTratiya PriyanshTratiya added Request for msft-202412 Branch Request for 202511 branch Request to backport a change to 202511 branch labels Jan 22, 2026
@mssonicbld
Copy link
Copy Markdown
Collaborator

@PriyanshTratiya PR conflicts with 202511 branch

ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
Signed-off-by: Yael Tzur <[email protected]>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Feb 6, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
@weiguo-nvidia
Copy link
Copy Markdown
Contributor

Hi @PriyanshTratiya

Could you help cherry-pick the PR to 202511? Thanks

PriyanshTratiya added a commit to PriyanshTratiya/sonic-mgmt that referenced this pull request Feb 9, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Feb 12, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
Signed-off-by: nnelluri-cisco <[email protected]>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 13, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
Signed-off-by: Raghavendran Ramanathan <[email protected]>
@PriyanshTratiya
Copy link
Copy Markdown
Contributor Author

@PriyanshTratiya PR conflicts with 202511 branch

#22304

vmittal-msft pushed a commit that referenced this pull request Feb 13, 2026
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.

Signed-off-by: Priyansh Tratiya <[email protected]>
anilal-amd pushed a commit to anilal-amd/anilal-forked-sonic-mgmt that referenced this pull request Feb 19, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
Signed-off-by: Zhuohui Tan <[email protected]>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
Signed-off-by: Abhishek <[email protected]>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
This PR adds the high‑scale BGP admin flap tests that build on top of the refactoring done in PR sonic-net#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.

Signed-off-by: Priyansh Tratiya <[email protected]>
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.

6 participants