Skip to content

Keep One Port Up in BGP Scale Test to Preserve PTF Reachability and Accurate Downtime#21979

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
PriyanshTratiya:fix/all-connections-minus-one-flap
Feb 14, 2026
Merged

Keep One Port Up in BGP Scale Test to Preserve PTF Reachability and Accurate Downtime#21979
bingwang-ms merged 1 commit intosonic-net:masterfrom
PriyanshTratiya:fix/all-connections-minus-one-flap

Conversation

@PriyanshTratiya
Copy link
Copy Markdown
Contributor

@PriyanshTratiya PriyanshTratiya commented Jan 20, 2026

Description of PR

Summary:
In IPv6 BGP scale flap testing, when all_flap is enabled we must keep one neighbor stable avoid dataplane downtime miscalculation. This PR updates the target selection logic to flap “all minus one” neighbors by removing the randomly chosen injection neighbor from the flapping neighbor list, and updates the log message accordingly.
Fixes # (issue)

Type of change

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

Back port request

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

Approach

What is the motivation for this PR?

The flap test requires a dedicated “injection neighbor” to remain up for route injection/verification. Previously, with all_flap=True, the injection neighbor could also be included in the flapping set, causing inconsistent/incorrect behavior.

How did you do it?

In tests/bgp/test_ipv6_bgp_scale.py (_select_targets_to_flap), when all_flap is enabled:

  • Copy the neighbor list (list(bgp_neighbors)) to avoid aliasing.
  • Randomly pick the injection neighbor.
  • Remove the injection neighbor from flapping_neighbors so we flap all other neighbors.
  • Update the log message to reflect “All - 1 neighbors”.

How did you verify/test it?

Ran the tests on Arista 7060X6 and Mellanox SN5640

Any platform specific information?

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

Documentation

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Collaborator

@r12f r12f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's update the PR title to be explicit on what test this change is going to affect.

@PriyanshTratiya PriyanshTratiya changed the title removing the injection neighbor from flapping neighbors Keep One Port Up in BGP Scale Test to Preserve PTF Reachability and Accurate Downtime Feb 10, 2026
@bingwang-ms bingwang-ms merged commit f423de6 into sonic-net:master Feb 14, 2026
20 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Feb 18, 2026
)

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
Signed-off-by: mssonicbld <sonicbld@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #22457

mssonicbld pushed a commit that referenced this pull request Feb 18, 2026
Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
Signed-off-by: mssonicbld <sonicbld@microsoft.com>
anilal-amd pushed a commit to anilal-amd/anilal-forked-sonic-mgmt that referenced this pull request Feb 19, 2026
)

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
Signed-off-by: Zhuohui Tan <zhuohui.tan@amd.com>
aronovic pushed a commit to aronovic/sonic-mgmt that referenced this pull request Mar 3, 2026
)

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
Signed-off-by: Mihut Aronovici <aronovic@cisco.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to msft-202412: Azure/sonic-mgmt.msft#1061

ravaliyel pushed a commit to ravaliyel/sonic-mgmt that referenced this pull request Mar 12, 2026
)

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
Signed-off-by: Ravali Yeluri (WIPRO LIMITED) <v-ryeluri@microsoft.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
)

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
Signed-off-by: Abhishek <abhishek@nexthop.ai>
vrajeshe pushed a commit to vrajeshe/sonic-mgmt that referenced this pull request Mar 23, 2026
)

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
Signed-off-by: Venkata Gouri Rajesh Etla <vrajeshe@cisco.com>
ravaliyel pushed a commit to ravaliyel/sonic-mgmt that referenced this pull request Mar 27, 2026
)

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
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.

5 participants