Skip to content

[autorestart][Multi ASIC] support autorestart test for multi ASIC platform#3696

Merged
smaheshm merged 8 commits intosonic-net:masterfrom
smaheshm:auto-restart
Jul 26, 2021
Merged

[autorestart][Multi ASIC] support autorestart test for multi ASIC platform#3696
smaheshm merged 8 commits intosonic-net:masterfrom
smaheshm:auto-restart

Conversation

@smaheshm
Copy link
Copy Markdown
Contributor

@smaheshm smaheshm commented Jun 22, 2021

Description of PR

Made changes to run autorestart feature test on multi ASIC platforms.

  • Changed "enum_dut_feature" fixture to return the container names rather than the feature name.
  • Containers names are added to the metadata file which the fixture uses to generate container name parameters.

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • [x ] Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

Add multi ASIC platform to the autorestart test case.

How did you do it?

Add new values in meta data file, updated the fixture to return container names, updated APIs to work on mutli ASIC platform.

{
    "vmsvc1-t1-nmasic-acs-1": {
        "svcstr-nmasic-acs-1": {
            "asic_services": {
                "lldp": [
                    "lldp2",
                    "lldp5"
                ],
                "database": [
                    "database2",
                    "database5"
                ],
                "bgp": [
                    "bgp0",
                    "bgp5"
                ],
                "teamd": [
                    "teamd0",
                    "teamd5"
                ],
                "syncd": [
                    "syncd2",
                    "syncd5"
                ],
                "swss": [
                    "swss0",
                    "swss5"
                ]
            },
            "intf_status": {

.
.
.

How did you verify/test it?

========================================================================================================================================================== 1 passed, 22 deselected, 1 warnings in 20.70 seconds ==========================================================================================================================================================
samaddik@svcstr-server-2:/var/sonic-mgmt/tests$ pytest autorestart/test_container_autorestart.py  --testbed=vmsvc1-t1-nmasic-acs-1 --inventory=../ansible/strsvc  --testbed_file=../ansible/testbed.csv --host-pattern=svcstr-nmasic-acs-1  --module-path=../ansible/library --disable_loganalyzer --skip_sanity
/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.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/sonic-mgmt/tests, inifile: pytest.ini
plugins: html-1.22.1, repeat-0.9.1, forked-1.3.0, xdist-1.28.0, metadata-1.11.0, ansible-2.2.2                                                                                       
collected 18 items                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                     
autorestart/test_container_autorestart.py ..s.ss....s.......                                                                                                                   [100%]

================================================================================== warnings summary ==================================================================================
/usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:538
  /usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:538: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.dualtor            
    self.import_plugin(import_spec)                                                                                                                                                  

-- Docs: https://docs.pytest.org/en/latest/warnings.html
================================================================ 14 passed, 4 skipped, 1 warnings in 2594.93 seconds =================================================================

Any platform specific information?

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

Documentation

@smaheshm smaheshm requested a review from a team as a code owner June 22, 2021 20:43
@smaheshm smaheshm requested review from yozhao101 and yxieca June 22, 2021 20:44
@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Jun 22, 2021

This pull request introduces 1 alert when merging ba4817d into 9268ecb - view on LGTM.com

new alerts:

  • 1 for Unused import

@smaheshm
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@smaheshm smaheshm requested a review from abdosi June 30, 2021 00:11
@smaheshm
Copy link
Copy Markdown
Contributor Author

smaheshm commented Jul 1, 2021

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@smaheshm smaheshm requested review from arlakshm and removed request for yozhao101 July 9, 2021 17:38
@smaheshm smaheshm removed the request for review from abdosi July 26, 2021 16:33
@smaheshm smaheshm merged commit d8a3e87 into sonic-net:master Jul 26, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…tform (sonic-net#3696)

* For multi ASIC platform, added container names in meta data file for frontend and backend ASIC on which autorestart test will be performed.
yxieca pushed a commit that referenced this pull request Oct 22, 2021
…4070)

What is the motivation for this PR?
PR #3696 added container names in meta data file for frontend and backend ASIC on which autorestart test will be performed for multi-asic platform. This assumes that on a multi-asic platform, there are always front-end and back-end asics.

However, on a VoQ chassis

linecards don't have back-end asics.
supervisor card has niether front-end nor back-end asics
So, need to check if we have front-end or back-end asics before trying to add them to asic_services.

How did you do it?
If we have front-end or back-end asics, (len != 0), only then pick up randomly and add it to asic_services.

How did you verify/test it?
Tested on multi-asic linecard and supervisor card in a VoQ chassis.
@smaheshm smaheshm deleted the auto-restart branch November 4, 2021 20:37
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