Skip to content

Issue 20728: Enhance configlet/test_add_rack.py for ipv6-only topos#21591

Open
anders-nexthop wants to merge 2 commits intosonic-net:masterfrom
nexthop-ai:anders.20728.test_add_rack-for-ipv6
Open

Issue 20728: Enhance configlet/test_add_rack.py for ipv6-only topos#21591
anders-nexthop wants to merge 2 commits intosonic-net:masterfrom
nexthop-ai:anders.20728.test_add_rack-for-ipv6

Conversation

@anders-nexthop
Copy link
Contributor

Description of PR

Summary:
Currently, the test checks for both ipv4 and ipv6 neighbors unconditionally, and will fail if either is missing. Change that behavior to instead check to see if neighbors exist before running the bgp checks. Add a failure case if no neighbors are found in either AF. This way the test is AF-agnostic.

Closes #20728

Type of change

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

Back port request

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

Approach

What is the motivation for this PR?

Extend coverage for IPv6-only topos

How did you do it?

Add logic to check whether v4/v6 neighbor ips exist before checking whether they are up. If no neighbor ips are found at all, the test fails.

How did you verify/test it?

Ran the test on a vs topo with only v6 neighbors. It fails before these changes and passes after they are added.

Any platform specific information?

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

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop anders-nexthop force-pushed the anders.20728.test_add_rack-for-ipv6 branch from 71be742 to ede382f Compare December 5, 2025 20:50
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop anders-nexthop force-pushed the anders.20728.test_add_rack-for-ipv6 branch from ede382f to aa1938f Compare December 6, 2025 01:12
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop
Copy link
Contributor Author

/azpw

@anders-nexthop anders-nexthop force-pushed the anders.20728.test_add_rack-for-ipv6 branch from aa1938f to fbf5115 Compare December 10, 2025 15:42
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca requested a review from yanmo96 December 10, 2025 16:17
@bingwang-ms
Copy link
Collaborator

@yanmo96 Can you help review this PR? Thanks

@anders-nexthop anders-nexthop force-pushed the anders.20728.test_add_rack-for-ipv6 branch from fbf5115 to c23e5ca Compare February 4, 2026 04:54
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@yanmo96 yanmo96 left a comment

Choose a reason for hiding this comment

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

LGTM

yxieca
yxieca previously approved these changes Feb 27, 2026
Copy link
Collaborator

@yxieca yxieca left a comment

Choose a reason for hiding this comment

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

Reviewed: handles IPv4/IPv6-only neighbor checks; looks good. Minor nit in comment.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop anders-nexthop force-pushed the anders.20728.test_add_rack-for-ipv6 branch from d9b2185 to d78a2d3 Compare February 27, 2026 23:18
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop
Copy link
Contributor Author

Minor nit: assumes remote is list-like. If it's a string, len() still works but is a bit indirect. Consider for clarity. Otherwise looks good.

Good catch. Looking at it again, I noticed that we had the same logic repeated in three places. I refactored it into a helper, and incorported your suggestion there. I think this is a bit cleaner. @yxieca please take another look when you get a chance, thanks.

Copy link
Collaborator

@yxieca yxieca left a comment

Choose a reason for hiding this comment

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

AI agent on behalf of Ying: Re-approved; changes look good. Ready once CI is green.

@anders-nexthop
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@anders-nexthop
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

Currently, the test checks for both ipv4 and ipv6 neighbors
unconditionally, and will fail if either is missing. Change that
behavior to instead check to see if neighbors exist before running the
bgp checks. Add a failure case if no neighbors are found in either AF.
This way the test is AF-agnostic.

Signed-off-by: Anders Linn <anders@nexthop.ai>
Signed-off-by: Anders Linn <anders@nexthop.ai>
@anders-nexthop anders-nexthop force-pushed the anders.20728.test_add_rack-for-ipv6 branch from d78a2d3 to 144e027 Compare March 6, 2026 20:02
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

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.

Bug:[IPv6 only topo] [test_add_rack] test_add_rack not updated to IPv6 only topology

5 participants