sonic-mgmt
sonic-mgmt copied to clipboard
Ignore two syslog messages when doing reboot/config_reload of T2 chassis with DNX chipset
Description of PR
Ignore two syslog messages when doing reboot/config_reload of T2 chassis with DNX chipset
Summary: Fixes # (issue)
Type of change
- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ x] Test case(new/improvement)
Back port request
- [ ] 201911
- [ ] 202012
Approach
What is the motivation for this PR?
When we reboot / config_reload on T2 chassis cards, we see 2 error messages in the linecards
-
During config_reload/reboot of linecard, LAGS are deleted, but ports are up, and we get mac learning events from SAI to orchagent which is in middle of cleanup and doesn't have the right data. This causes error message like Failed to get port by bridge port ID
-
reboot/config_reload on supoervisor will cause all the fabric links in the linecard to bounce which results in SAI sending messages orchagent regarding the fabric port state change. However, in linecards in T2 chassis, there is modelling of fabric ports in orchagent. Thus, orchagent generates error message indication to port object found for the port.
How did you do it?
Created ignore_t2_syslog_msgs method in dut_utils.py Called the method in cases when we do rebbot or reload - tests/common/config_reload.py - tests/common/reboot.py - tests/platform_tests/api/test_module.py
How did you verify/test it?
Tested the reboot/reload testcases
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
This pull request introduces 1 alert when merging cefbe9d38bccb1cb360b99007b2d7384438567f8 into 6af5158a3c7df54c939f1273ab03a1f306246ef7 - view on LGTM.com
new alerts:
- 1 for Unused local variable
/easycla
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.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook
Fixing tests/common/reboot.py
Fixing tests/platform_tests/api/test_module.py
Fixing tests/common/helpers/dut_utils.py
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook
Fixing tests/common/helpers/dut_utils.py
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Failed
- hook id: check-ast
...
[truncated extra lines, please run pre-commit locally to view full check results]
To run the pre-commit checks locally, you can follow below steps:
- 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.
- Ensure that the
pre-commitpackage is installed:
sudo pip install pre-commit
- Go to repository root folder
- Install the pre-commit hooks:
pre-commit install
- Use pre-commit to check staged file:
pre-commit
- Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>
This pull request introduces 3 alerts when merging a9f1e68be17a63fdb437b7970c6cbb45e4ae8884 into af9b43ff6aa37e5a25d3bb779470f9e5751150ad - view on LGTM.com
new alerts:
- 3 for Unused local variable
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.
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.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook
Fixing tests/common/reboot.py
Fixing tests/platform_tests/api/test_module.py
Fixing tests/common/helpers/dut_utils.py
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook
Fixing tests/common/helpers/dut_utils.py
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Failed
- hook id: check-ast
...
[truncated extra lines, please run pre-commit locally to view full check results]
To run the pre-commit checks locally, you can follow below steps:
- 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.
- Ensure that the
pre-commitpackage is installed:
sudo pip install pre-commit
- Go to repository root folder
- Install the pre-commit hooks:
pre-commit install
- Use pre-commit to check staged file:
pre-commit
- Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>
@sanmalho-git Please see if we still need this PR ?
@sanmalho-git Please see if we still need this PR ?
@abdosi We are still seeing those two messages in the logs and they are not in tests/common/plugins/loganalayze/loganalyzer_common_ignore. So we still need the PR.