sonic-mgmt
sonic-mgmt copied to clipboard
Macsec scale test on a t2 topo
Summary: Fixes # 13244
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?
- Basic infra and fine tuning needed to run macsec sessions on a linecard in a chassis with 32 macsec sessions.
- Support more tests on dnx based platforms which has limitation now with portchannel
- Add config save at startup and cleanup of macsec sessions, so that macsec sessions remain present in config_db for a pipeline run of the entire sonic-mgmt testsuite
- Add a testcase to trigger link flap in 16+ interface and see macsec sessions comes back stable.
How did you do it?
Added logic and finetuning
How did you verify/test it?
Ran the macsec testsuite to get 100% pass on a testbed with LC having 32 macsec sessions.
jujoseph@sonic-mgmt-jujoseph_master:/var/src/sonic-mgmt-int/tests$ ./run_tests.sh -u -n vmsvc3-t2-xxxx-1 -c macsec/test_deployment.py::**TestDeployment::test_scale_rekey** -f ../ansible/testbed.yaml -i ../ansible/strsvc,../ansible/veos -t 't2,any' -e "--skip_sanity --disable_loganalyzer -x --enable_macsec --macsec_profile=MACSEC_PROFILE"
=== Running tests in groups ===
Running: python2 -m pytest macsec/test_deployment.py::TestDeployment::test_scale_rekey --inventory ../ansible/strsvc,../ansible/veos --host-pattern svcstr-xxxx-lc1-1,svcstr-xxxx-lc2-1,svcstr-xxxx-lc3-1,svcstr-xxxx-sup-1 --testbed vmsvc3-t2-xxxx-1 --testbed_file ../ansible/testbed.yaml --log-cli-level warning --log-file-level debug --kube_master unset --showlocals --assert plain --show-capture no -rav --allow_recover --ignore=ptftests --ignore=acstests --ignore=saitests --ignore=scripts --ignore=k8s --ignore=sai_qualify --junit-xml=logs/tr.xml --log-file=logs/test.log --topology t2,any --skip_sanity --disable_loganalyzer -x --enable_macsec --macsec_profile=MACSEC_PROFILE
/usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography.exceptions import InvalidSignature
=================================================================================== test session starts ====================================================================================
platform linux2 -- Python 2.7.18, pytest-4.6.11, py-1.11.0, pluggy-0.13.1
ansible: 2.8.20
rootdir: /var/src/sonic-mgmt-int/tests, inifile: pytest.ini
plugins: ansible-2.2.4, celery-4.4.7, html-1.22.1, repeat-0.9.1, forked-1.3.0, metadata-1.11.0, xdist-1.28.0, allure-pytest-2.8.22
collecting ...
----------------------------------------------------------------------------------- live log collection ------------------------------------------------------------------------------------
00:28:17 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - dpu
00:28:17 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - dpu
00:28:17 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - dpu
00:28:28 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - ptp-256
00:28:28 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - ptp-256
00:29:03 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - dpu
00:29:03 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - dpu
00:29:03 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - dpu
00:29:14 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - ptp-256
00:29:14 testbed.get_testbed_type L0261 WARNING| Unsupported testbed type - ptp-256
PASSED [100%]
-------------------------------------------------------------- generated xml file: /var/src/sonic-mgmt-int/tests/logs/tr.xml ---------------------------------------------------------------
=============================================================================== 1 passed in 4292.18 seconds ==============================================================================