Skip to content

Improve stress acl test#6960

Merged
xwjiang-ms merged 8 commits intosonic-net:masterfrom
xwjiang-ms:improve_stress_acl_test
Jan 13, 2023
Merged

Improve stress acl test#6960
xwjiang-ms merged 8 commits intosonic-net:masterfrom
xwjiang-ms:improve_stress_acl_test

Conversation

@xwjiang-ms
Copy link
Copy Markdown
Contributor

@xwjiang-ms xwjiang-ms commented Dec 5, 2022

Description of PR

Summary:
Fixes # (issue)

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?

In acl stress test, ACL table creation can be failed on dualtor platform because of insufficient resources
The test case only add/delete a same rule, which is not the real scenario in production

How did you do it?

  1. Support dualtor platform
  2. Add/delete 100 acl rules
  3. Use sonic-cfggen to add acl table and rule to config db, will reduce test time
  4. Use loganalyzer to check add/delete status
  5. Use nohup to run bash scripts, and check running status every 20 seconds

How did you verify/test it?

Run testcase

Any platform specific information?

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

Documentation

xwjiang2021 added 4 commits December 5, 2022 05:43
What is the motivation for this PR?
In acl stress test, ACL table creation can be failed on dualtor platform
because of insufficient resources
The test case only add/delete a same rule, which is not the real
scenario in production

How did you do it?
Support dualtor platform
Add/delete 100 acl rules
Use sonic-cfggen to add acl table and rule to config db, will reduce
test time
Use loganalyzer to check add/delete status

How did you verify/test it?
Run testcase

Any platform specific information?
Supported testbed topology if it's a new test case?
@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.................................................Passed
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing tests/acl/templates/acltb_test_stress_acl_rules.j2

check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Passed

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>

@xwjiang-ms xwjiang-ms merged commit 68e024d into sonic-net:master Jan 13, 2023
@xwjiang-ms xwjiang-ms deleted the improve_stress_acl_test branch January 13, 2023 05:40
@vperumal
Copy link
Copy Markdown
Collaborator

vperumal commented Jan 21, 2023

@abdosi - Can we cherry pick this PR into 202205 branch. I am not able to edit the description to add the include the 202205 label.

wangxin pushed a commit that referenced this pull request Jan 30, 2023
* Improve acl stress test

What is the motivation for this PR?
In acl stress test, ACL table creation can be failed on dualtor platform
because of insufficient resources
The test case only add/delete a same rule, which is not the real
scenario in production

How did you do it?
Support dualtor platform
Add/delete 100 acl rules
Use sonic-cfggen to add acl table and rule to config db, will reduce
test time
Use loganalyzer to check add/delete status
Use nohup to run bash script, avoid ssh overtime

How did you verify/test it?
Run testcase

Any platform specific information?
Supported testbed topology if it's a new test case?
wangxin pushed a commit that referenced this pull request Jan 30, 2023
* Improve acl stress test

What is the motivation for this PR?
In acl stress test, ACL table creation can be failed on dualtor platform
because of insufficient resources
The test case only add/delete a same rule, which is not the real
scenario in production

How did you do it?
Support dualtor platform
Add/delete 100 acl rules
Use sonic-cfggen to add acl table and rule to config db, will reduce
test time
Use loganalyzer to check add/delete status
Use nohup to run bash script, avoid ssh overtime

How did you verify/test it?
Run testcase

Any platform specific information?
Supported testbed topology if it's a new test case?
justin-wong-ce added a commit to justin-wong-ce/sonic-mgmt that referenced this pull request Nov 21, 2024
creation

In `acl/test_stress_acl.py`, it attempts to retrieve an interface that
can be used to create a ACL table. DUTs with and without PortChannels
require different methods respectively.

Currently, it checks by filtering with topo. However, some topology
flags can have configurations that have or not have PortChannels, making
topos no longer a sufficient check.

Fix by checking if a PortChannel exists. If it does - use it. If it does
not - fallback on the secondary method to retrieve a normal interface
name if its a not a dualtor topo (due to
sonic-net#6960).
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.

5 participants