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

[TestGap] New tests to cover VNET route advertisement. #14666

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

siqbal1986
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)
Added new tests to cover the previously untested scenario. These tests create VNET Vxlan ECMP routes and then chekc if they are advertised to the upstream neighbors.

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?

How did you do it?

Create the BGP profile
Create a VNET routes.
check neighbor bgp routes to verify the advertisements.
The following tests are performed for Both V4 and V6 routes.

Step Goal Expected results
Create a tunnel route and advertise the tunnel route to all neighbor without community id BGP ALL BGP neighbors can recieve the advertised BGP routes
Create a tunnel route and advertise the tunnel route to all neighbor with community id BGP ALL BGP neighbors can recieve the advertised BGP routes with community id
Update a tunnel route and advertise the tunnel route to all neighbor with new community id BGP ALL BGP neighbors can recieve the advertised BGP routes with new community id
Create a tunnel route and advertise the tunnel route to all neighbor with BGP profile, but create the profile later BGP ALL BGP neighbors can recieve the advertised BGP routes without community id first, after the profile table created, the community id would be added and all BGP neighbors can recieve this update and associate the community id with the route
Delete a tunnel route BGP ALL BGP neighbors can remove the previously advertised BGP routes
Create 400 tunnel routes and advertise all tunnel routes to all neighbor with community id BGP scale ALL BGP neighbors can recieve 400 advertised BGP routes with community id and record the time
Updat BGP_PROFILE_TABLE with new community id for 400 tunnel routes and advertise all tunnel routes to all neighbor with new community id BGP scale ALL BGP neighbors can recieve 400 advertised BGP routes with new community id and record the time

How did you verify/test it?

image

Any platform specific information?

These scale tests are set to un with 400 routes. Altough I have ran these tests with 4k routes without any problem, but that takes the test run time to around 40 minutes.

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

T1 Cisco, T1 Mlnx, VS

Documentation

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

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/vxlan_ecmp_utils.py:612:12: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants