Skip to content

[dualtor] create dualtor default tunnel during presetup based on asic type#7809

Merged
kevinskwang merged 1 commit intosonic-net:masterfrom
yenlu-keith:master
Mar 22, 2023
Merged

[dualtor] create dualtor default tunnel during presetup based on asic type#7809
kevinskwang merged 1 commit intosonic-net:masterfrom
yenlu-keith:master

Conversation

@yenlu-keith
Copy link
Copy Markdown
Contributor

@yenlu-keith yenlu-keith commented Mar 21, 2023

Description
In our lab environment, sonic dualTOR router will need to create tunnel before running the testcase.

Steps to reproduce the issue
"dualtor/test_orchagent_active_tor_downstream.py::test_downstream_ecmp_nexthops"

Describe the results you expected
testcase Pass

Additional information you deem important
some of dualtor testcase will need to switch from downlink to uplink by mocking tunnel
so that testcase is able to default have tunnel on below
https://github.com/sonic-net/sonic-swss/blob/master/orchagent/muxorch.cpp#L932
https://github.com/sonic-net/sonic-swss/blob/master/orchagent/muxorch.cpp#L933

to avoid the failure on removing non-existing tunnel during pre-setup.
Mar 6 22:59:58.293515 mth-t0-64 INFO swss#supervisord: tunnelmgrd Cannot find device "tun0"
Mar 6 22:59:52.922587 mth-t0-64 WARNING swss#tunnelmgrd: :- doTunnelRouteTask: Failed to del route 192.168.0.15/32, res

@mssonicbld
Copy link
Copy Markdown
Collaborator

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.................................................Passed
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/common/devices/sonic.py:1631:38: E203 whitespace before ':'
tests/common/devices/sonic.py:1636:17: E129 visually indented line with same indent as next logical line

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>

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.

4 participants