Skip to content

[route] Fix random loss of arp info in test_static_route_ecmp#6614

Merged
yaqiangz merged 2 commits intosonic-net:masterfrom
yaqiangz:azure-master_fix_test_static_route_ecmp
Oct 26, 2022
Merged

[route] Fix random loss of arp info in test_static_route_ecmp#6614
yaqiangz merged 2 commits intosonic-net:masterfrom
yaqiangz:azure-master_fix_test_static_route_ecmp

Conversation

@yaqiangz
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Fixes # 6576

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Fix test_static_route_ecmp failed due to losing arp info after config reload.

How did you do it?

After config reload, run ping cmd.

How did you verify/test it?

Run test.

Any platform specific information?

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

Documentation

@azure-pipelines
Copy link
Copy Markdown

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/route/test_static_route.py

fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/route/test_static_route.py:10:1: F401 'tests.common.fixtures.ptfhost_utils.change_mac_addresses' imported but unused
tests/route/test_static_route.py:10:1: F401 'tests.common.fixtures.ptfhost_utils.copy_arp_responder_py' imported but unused
tests/route/test_static_route.py:13:1: F401 'tests.common.dualtor.mux_simulator_control.mux_server_url' imported but unused
tests/route/test_static_route.py:14:1: F401 'tests.common.dualtor.mux_simulator_control.toggle_all_simulator_ports_to_rand_selected_tor_m' imported but unused
tests/route/test_static_route.py:21:1: F401 'tests.flow_counter.flow_counter_utils.is_route_flow_counter_supported' imported but unused
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

Blueve
Blueve previously approved these changes Oct 25, 2022
@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Oct 25, 2022

This pull request introduces 1 alert when merging 9c3bef9 into 04f0a29 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@azure-pipelines
Copy link
Copy Markdown

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/route/test_static_route.py

fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/route/test_static_route.py:10:1: F401 'tests.common.fixtures.ptfhost_utils.change_mac_addresses' imported but unused
tests/route/test_static_route.py:10:1: F401 'tests.common.fixtures.ptfhost_utils.copy_arp_responder_py' imported but unused
tests/route/test_static_route.py:13:1: F401 'tests.common.dualtor.mux_simulator_control.mux_server_url' imported but unused
tests/route/test_static_route.py:14:1: F401 'tests.common.dualtor.mux_simulator_control.toggle_all_simulator_ports_to_rand_selected_tor_m' imported but unused
tests/route/test_static_route.py:21:1: F401 'tests.flow_counter.flow_counter_utils.is_route_flow_counter_supported' imported but unused
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@yaqiangz yaqiangz merged commit 7f0a45e into sonic-net:master Oct 26, 2022
yaqiangz added a commit that referenced this pull request Oct 26, 2022
…#6615)

What is the motivation for this PR?
Manually cherry-pick and resolve conflict of this PR: #6614
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
…net#6614)

What is the motivation for this PR?
Fix test_static_route_ecmp failed due to losing arp info after config reload.

How did you do it?
After config reload, run ping cmd.

How did you verify/test it?
Run test.
wangxin pushed a commit that referenced this pull request Oct 31, 2022
What is the motivation for this PR?
Fix test_static_route_ecmp failed due to losing arp info after config reload.

How did you do it?
After config reload, run ping cmd.

How did you verify/test it?
Run test.
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.

[Arista] test_static_route_ecmp failed due to received packet from wrong port

3 participants