Skip to content

Automating VxLAN Test Cases for T1 and T1-Lag: TC1#4954

Merged
prsunny merged 15 commits intosonic-net:masterfrom
rraghav-cisco:rraghav-vxlan
Feb 1, 2022
Merged

Automating VxLAN Test Cases for T1 and T1-Lag: TC1#4954
prsunny merged 15 commits intosonic-net:masterfrom
rraghav-cisco:rraghav-vxlan

Conversation

@rraghav-cisco
Copy link
Contributor

@rraghav-cisco rraghav-cisco commented Jan 15, 2022

Description of PR
Test script for VxLAN on T1/T1-Lag Topology.

Fixes
None

Type of change
Test case(new/improvement)

Back port request
Not Applicable

Approach

  1. DUT is pre-configured in T1 mode, explained in https://github.com/Azure/sonic-mgmt/blob/master/docs/testbed/README.testbed.Overview.md
  2. VxLAN testing is done using the PTF container as the core-facing(T2) as well as the edge(T0) facing device.
  3. Randomly pick 4 interfaces facing T0 AristaVMs and use them for the edge(customer/payload) traffic.
  4. The default BGP route from T2 AristaVMs carry as the core-facing(outer layer) traffic.
  5. The configuration steps for VxLAN test includes:
  • Setup VxLAN switch config
  • Setup VxLAN Tunnels(One for V4 encap).
  • Create Vnets (One each for v4inv4).
  • Assign interrfaces for each Vnet.
  • Assign Neighbors for each Interface.
  • Configure Vnet routes - these could be ECMP or non-ECMP. The number can be passed by the user in the form of command line arguments.

What is the motivation for this PR?

  1. Current script is written for T0. The VxLAN usecase presented is for T1.
  2. The new script should pre-configure everything that is needed for the test cases to be run either all together, and individually as well.

How did you do it?

  1. Added 2 scripts, one is the main test_vxlan.py, and one is PTF program:vxlan_traffic.py.
  2. The main test_vxlan.py basically configures all the steps listed above, and calls out the ptf program.
  3. The PTF program does encap testing, basically sending a payload traffic in one direction and expecting the encapsulated packets to return.

How did you verify/test it?
Ran the script on T1 and T1-lag topology hardware.
Ex CLI:
run_tests.sh -n ucs-m5-2 -d mth64-m5-2 -O -u -e -s -e --disable_loganalyzer -m individual -p /home/vxr/vxlan/logs/ -c 'vxlan/test_vxlan.py'

To test ECMP with 2 paths per destination:
./run_tests.sh -n ucs-m5-2 -d mth64-m5-2 -O -u -e -s -e --disable_loganalyzer -m individual -p /home/vxr/vxlan/logs/ -c 'vxlan/test_vxlan.py' -e '--nhs_per_destination=2'

To test ECMP+Scale:
./run_tests.sh -n ucs-m5-2 -d mth64-m5-2 -O -u -e -s -e --disable_loganalyzer -m individual -p /home/vxr/vxlan/logs/ -c 'vxlan/test_vxlan.py' -e '--ecmp_nhs_per_destination=128' -e '--total_number_of_nexthops=128000'

Any platform specific information?

Caveats/Limitations:

Documentation
Pls see the testcase list in the HLD:https://github.com/Azure/SONiC/blob/8ca1ac93c8912fda7b09de9bfd51498e5038c292/doc/vxlan/Overlay%20ECMP%20with%20BFD.md#28-test-plan

Logs

-------------------------------------------------------- generated xml file: /home/vxr/vxlan/logs/vxlan/test_vxlan_2022-01-15-00-29-19.xml ---------------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
==================================================================================== 4 passed in 231.31 seconds ====================================================================================

@rraghav-cisco rraghav-cisco requested a review from a team as a code owner January 15, 2022 00:38
@ghost
Copy link

ghost commented Jan 15, 2022

CLA assistant check
All CLA requirements met.

@lgtm-com
Copy link

lgtm-com bot commented Jan 15, 2022

This pull request introduces 1 alert when merging 784c16a into 0c03fe2 - view on LGTM.com

new alerts:

  • 1 for Syntax error

@prsunny prsunny requested a review from shi-su January 15, 2022 02:39
@rraghav-cisco rraghav-cisco marked this pull request as draft January 15, 2022 03:38
@rraghav-cisco rraghav-cisco marked this pull request as ready for review January 15, 2022 04:51
@rraghav-cisco rraghav-cisco marked this pull request as draft January 15, 2022 06:06
@rraghav-cisco rraghav-cisco marked this pull request as ready for review January 15, 2022 08:10
@rraghav-cisco rraghav-cisco changed the title Automating VxLAN Test Cases for T1 and T1-Lag Automating VxLAN Test Cases for T1 and T1-Lag: TC1 Jan 20, 2022
@lgtm-com
Copy link

lgtm-com bot commented Jan 25, 2022

This pull request introduces 11 alerts when merging efca139 into 5c4303b - view on LGTM.com

new alerts:

  • 5 for Unused import
  • 3 for Unused local variable
  • 1 for Constant in conditional expression or statement
  • 1 for Comparison of constants
  • 1 for Module is imported with 'import' and 'import from'

@lgtm-com
Copy link

lgtm-com bot commented Jan 27, 2022

This pull request introduces 11 alerts when merging f57f317 into afb78b4 - view on LGTM.com

new alerts:

  • 5 for Unused import
  • 3 for Unused local variable
  • 1 for Constant in conditional expression or statement
  • 1 for Comparison of constants
  • 1 for Module is imported with 'import' and 'import from'

@lgtm-com
Copy link

lgtm-com bot commented Jan 27, 2022

This pull request introduces 11 alerts when merging 3cf4009 into d23d893 - view on LGTM.com

new alerts:

  • 5 for Unused import
  • 3 for Unused local variable
  • 1 for Constant in conditional expression or statement
  • 1 for Comparison of constants
  • 1 for Module is imported with 'import' and 'import from'

@prsunny
Copy link
Contributor

prsunny commented Jan 31, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Contributor

prsunny commented Jan 31, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Contributor

prsunny commented Feb 1, 2022

@rraghav-cisco , please resolve conflicts

@lgtm-com
Copy link

lgtm-com bot commented Feb 1, 2022

This pull request introduces 11 alerts when merging 627cca6 into e167a75 - view on LGTM.com

new alerts:

  • 5 for Unused import
  • 3 for Unused local variable
  • 1 for Constant in conditional expression or statement
  • 1 for Comparison of constants
  • 1 for Module is imported with 'import' and 'import from'

@prsunny prsunny merged commit 910266e into sonic-net:master Feb 1, 2022
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.

3 participants