-
Notifications
You must be signed in to change notification settings - Fork 708
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
[dualtor] Fix flakiness of route/test_static_route.py #14202
[dualtor] Fix flakiness of route/test_static_route.py #14202
Conversation
Fixes: 1) Adding "setup_standby_ports_on_rand_unselected_tor" fixture to setup ports in standby mode in case of active-active topology. This is needed for packets not to go out of unexpected tor and cause test failures. 2) Test is performing "config_reload", this can cause switchover (active to standy and viceversa). But rand_selected_dut should be in active state for traffic verification to pass, so after config_reload we need to toggle ports to rand_selected_dut.
/azp run Azure.sonic-mgmt |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi @lolyu @StormLiangMS Please review the changes. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
hi @vkjammala-arista there is a conflict, could you help with? |
Resolved the conflict, thanks! |
* [dualtor] Fix flakiness of route/test_static_route.py Fixes: 1) Adding "setup_standby_ports_on_rand_unselected_tor" fixture to setup ports in standby mode in case of active-active topology. This is needed for packets not to go out of unexpected tor and cause test failures. 2) Test is performing "config_reload", this can cause switchover (active to standy and viceversa). But rand_selected_dut should be in active state for traffic verification to pass, so after config_reload we need to toggle ports to rand_selected_dut. * Addressing review comments. * Reverting minor unintended change.
* [dualtor] Fix flakiness of route/test_static_route.py Fixes: 1) Adding "setup_standby_ports_on_rand_unselected_tor" fixture to setup ports in standby mode in case of active-active topology. This is needed for packets not to go out of unexpected tor and cause test failures. 2) Test is performing "config_reload", this can cause switchover (active to standy and viceversa). But rand_selected_dut should be in active state for traffic verification to pass, so after config_reload we need to toggle ports to rand_selected_dut. * Addressing review comments. * Reverting minor unintended change.
Cherry-pick PR to 202405: #14645 |
Cherry-pick PR to 202311: #14646 |
* [dualtor] Fix flakiness of route/test_static_route.py Fixes: 1) Adding "setup_standby_ports_on_rand_unselected_tor" fixture to setup ports in standby mode in case of active-active topology. This is needed for packets not to go out of unexpected tor and cause test failures. 2) Test is performing "config_reload", this can cause switchover (active to standy and viceversa). But rand_selected_dut should be in active state for traffic verification to pass, so after config_reload we need to toggle ports to rand_selected_dut. * Addressing review comments. * Reverting minor unintended change.
* [dualtor] Fix flakiness of route/test_static_route.py Fixes: 1) Adding "setup_standby_ports_on_rand_unselected_tor" fixture to setup ports in standby mode in case of active-active topology. This is needed for packets not to go out of unexpected tor and cause test failures. 2) Test is performing "config_reload", this can cause switchover (active to standy and viceversa). But rand_selected_dut should be in active state for traffic verification to pass, so after config_reload we need to toggle ports to rand_selected_dut. * Addressing review comments. * Reverting minor unintended change.
Description of PR
Summary:
Fix flakiness of route/test_static_route.py due to packet going to unexpected ToR
Fixes # https://github.com/aristanetworks/sonic-qual.msft/issues/230
Type of change
Back port request
Approach
What is the motivation for this PR?
As part of traffic verification, sometimes packet is going out of wrong ToR and causing test failures with signature something like
AssertionError: Received expected packet on port 30 for device 0, but it should have arrived on one of these ports: [52, 0, 36].
Reason being, in case of
dualtor-aa
, both the duts will be in active state and packet can go out ofrand_unselected_dut
.How did you do it?
setup_standby_ports_on_rand_unselected_tor
fixture to setup ports in standby mode in case of active-active topology. This is needed for packets not to go out of unexpected tor and cause test failures.rand_selected_dut
should be in active state for traffic verification to pass, so after config_reload weneed to toggle ports to rand_selected_dut.
How did you verify/test it?
Stressed the test on
Arista-7260CX3-D108C8
and test is passing.Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation