Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[T2] [Chassis] Route flap fix on upstream LC for AZNG route changes #14804

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

sanjair-git
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

  • With recent changes for AZNG routes on upstream LC, 'test_route_flap' test case fails for upstream T2 line card.
  • This PR fixes the above issue for T2 upstream line card.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

  • With recent changes for AZNG routes on upstream LC, 'test_route_flap' test case fails for upstream T2 line card with the following issue.
>     def fail(self, msg=None):
        """Fail immediately, with the given message."""
       raise self.failureException(msg)
E       AssertionError: Received expected packet on port 13 for device 0, but it should have arrived on one of these ports: [23, 31, 30, 21, 18, 20, 28, 7, 16, 19, 17, 6, 29, 22].
  • This PR fixes the above issue for upstream T2 line card.

How did you do it?

  • Update the ptf_receiving_ports list if the duthost is upstream T2 line card.

How did you verify/test it?

  • Verify that the test case passes for both upstream and downstream T2 line cards.

Any platform specific information?

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

Documentation

image

@judyjoseph
Copy link
Contributor

judyjoseph commented Oct 1, 2024

@abdosi could you review

@@ -441,7 +446,10 @@ def test_route_flap(duthosts, tbinfo, ptfhost, ptfadapter,
neighbor_type = get_neighbor_info(duthost, dev_port, tbinfo)
recv_neigh_list = get_all_recv_neigh(duthosts, neighbor_type)
logger.info("Receiving ports neighbor list : {}".format(recv_neigh_list))
ptf_recv_ports = get_all_ptf_recv_ports(duthosts, tbinfo, recv_neigh_list)
if 't2' in tbinfo["topo"]["type"] and duthost == duthost_upstream:
ptf_recv_ports = get_ptf_recv_ports(duthost, tbinfo)
Copy link
Contributor

Choose a reason for hiding this comment

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

what are we doing here ? I could not follow the logic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @abdosi,

Earlier before this PR, we are selecting ptf receiving ports from the following:

  • Fetch the 'neighbor type' (LeafRouter/SpineRouter/AZNGhub) based on the chosen dev_port from get_dev_port_and_route
  • Get all the neighbors of same neighbor type and fetch the ptf receiving ports list based on the retrieved neighbors list.
  • Pass the received ptf ports list to send_recv_ping_packet method for further testing.
  • get_all_ptf_recv_ports method is being used for this.

But now with the latest upstream LC changes w.r.t AZNG, instead of selecting receiving ports based on the neighbor type, we are doing the following,

  • Check if the topo is 't2' and if the selected duthost for this test run is 'upstream' line card
  • If so, get all the ptf receiving ports of the upstream line card and pass them to 'send_recv_ping_packet'
  • For other duts, it will follow the same old way to get the ptf receiving ports list.
  • get_ptf_recv_ports method is being used for this.

enum_upstream_dut_hostname fixture

Loop correction
@abdosi abdosi merged commit 3349965 into sonic-net:master Oct 3, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants