Skip to content

[ptf] Consider only expected packets for timeout#21150

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
vkjammala-arista:fix-ptf-timeout
Dec 20, 2024
Merged

[ptf] Consider only expected packets for timeout#21150
StormLiangMS merged 1 commit intosonic-net:masterfrom
vkjammala-arista:fix-ptf-timeout

Conversation

@vkjammala-arista
Copy link
Copy Markdown
Contributor

@vkjammala-arista vkjammala-arista commented Dec 12, 2024

Why I did it

dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[offer|ack] tests are failing on dualtor topologies with signature Failed: /tmp/dhcp_stress_test_offer.json is missing, see issue https://github.com/aristanetworks/sonic-qual.msft/issues/325 for more details.

Work item tracking
  • Microsoft ADO (number only):

How I did it

count_matched_packets method is getting stuck in a while loop as long as ptf server port receives any packet (Ex: in dualtor case, we do see continuous ICMP packets on ptf port). Fix is to consider only expected packets w.r.t timeout (similar to count_matched_packets_all_ports logic).

How to verify it

With this PR changes we should not see dhcp_relay/test_dhcp_relay_stress.py failures on dualtor topologies with symptom Failed: /tmp/dhcp_stress_test_offer.json is missing.

Which release branch to backport (provide reason below if selected)

  • 202405
  • 202411

Reason: Issue is seen in 202405 branch.

Tested branch (Please provide the tested image version)

  • 202405

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

"count_matched_packets" method is getting stuck in a while loop as long
as ptf server port receives any packet (Ex: in dualtor case, we do see
continuous ICMP packets on ptf port). Fix is to consider only expected
packets w.r.t timeout (similar to "count_matched_packets_all_ports" logic).
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@yaqiangz yaqiangz left a comment

Choose a reason for hiding this comment

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

LGTM

@vkjammala-arista
Copy link
Copy Markdown
Contributor Author

Hi @StormLiangMS, please help merging this PR.

@yyynini
Copy link
Copy Markdown
Contributor

yyynini commented Dec 19, 2024

LGTM

@StormLiangMS StormLiangMS requested a review from yyynini December 20, 2024 00:20
Copy link
Copy Markdown
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

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

LGTM

@StormLiangMS StormLiangMS merged commit 329c384 into sonic-net:master Dec 20, 2024
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Dec 20, 2024
Why I did it
dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[offer|ack] tests are failing on dualtor topologies with signature Failed: /tmp/dhcp_stress_test_offer.json is missing, see issue aristanetworks/sonic-qual.msft#325 for more details.

Work item tracking
Microsoft ADO (number only):
How I did it
count_matched_packets method is getting stuck in a while loop as long as ptf server port receives any packet (Ex: in dualtor case, we do see continuous ICMP packets on ptf port). Fix is to consider only expected packets w.r.t timeout (similar to count_matched_packets_all_ports logic).

How to verify it
With this PR changes we should not see dhcp_relay/test_dhcp_relay_stress.py failures on dualtor topologies with symptom Failed: /tmp/dhcp_stress_test_offer.json is missing.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202411: #21233

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Dec 20, 2024
Why I did it
dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[offer|ack] tests are failing on dualtor topologies with signature Failed: /tmp/dhcp_stress_test_offer.json is missing, see issue aristanetworks/sonic-qual.msft#325 for more details.

Work item tracking
Microsoft ADO (number only):
How I did it
count_matched_packets method is getting stuck in a while loop as long as ptf server port receives any packet (Ex: in dualtor case, we do see continuous ICMP packets on ptf port). Fix is to consider only expected packets w.r.t timeout (similar to count_matched_packets_all_ports logic).

How to verify it
With this PR changes we should not see dhcp_relay/test_dhcp_relay_stress.py failures on dualtor topologies with symptom Failed: /tmp/dhcp_stress_test_offer.json is missing.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #21234

mssonicbld pushed a commit that referenced this pull request Dec 24, 2024
Why I did it
dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[offer|ack] tests are failing on dualtor topologies with signature Failed: /tmp/dhcp_stress_test_offer.json is missing, see issue aristanetworks/sonic-qual.msft#325 for more details.

Work item tracking
Microsoft ADO (number only):
How I did it
count_matched_packets method is getting stuck in a while loop as long as ptf server port receives any packet (Ex: in dualtor case, we do see continuous ICMP packets on ptf port). Fix is to consider only expected packets w.r.t timeout (similar to count_matched_packets_all_ports logic).

How to verify it
With this PR changes we should not see dhcp_relay/test_dhcp_relay_stress.py failures on dualtor topologies with symptom Failed: /tmp/dhcp_stress_test_offer.json is missing.
mssonicbld pushed a commit that referenced this pull request Dec 24, 2024
Why I did it
dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[offer|ack] tests are failing on dualtor topologies with signature Failed: /tmp/dhcp_stress_test_offer.json is missing, see issue aristanetworks/sonic-qual.msft#325 for more details.

Work item tracking
Microsoft ADO (number only):
How I did it
count_matched_packets method is getting stuck in a while loop as long as ptf server port receives any packet (Ex: in dualtor case, we do see continuous ICMP packets on ptf port). Fix is to consider only expected packets w.r.t timeout (similar to count_matched_packets_all_ports logic).

How to verify it
With this PR changes we should not see dhcp_relay/test_dhcp_relay_stress.py failures on dualtor topologies with symptom Failed: /tmp/dhcp_stress_test_offer.json is missing.
VladimirKuk pushed a commit to Marvell-switching/sonic-buildimage that referenced this pull request Jan 21, 2025
Why I did it
dhcp_relay/test_dhcp_relay_stress.py::test_dhcp_relay_stress[offer|ack] tests are failing on dualtor topologies with signature Failed: /tmp/dhcp_stress_test_offer.json is missing, see issue aristanetworks/sonic-qual.msft#325 for more details.

Work item tracking
Microsoft ADO (number only):
How I did it
count_matched_packets method is getting stuck in a while loop as long as ptf server port receives any packet (Ex: in dualtor case, we do see continuous ICMP packets on ptf port). Fix is to consider only expected packets w.r.t timeout (similar to count_matched_packets_all_ports logic).

How to verify it
With this PR changes we should not see dhcp_relay/test_dhcp_relay_stress.py failures on dualtor topologies with symptom Failed: /tmp/dhcp_stress_test_offer.json is missing.
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