Added test case to make sure when teamd feature/service is stop kernel device is cleanup and SIGTERM are handled gracefully#2186
Merged
abdosi merged 4 commits intosonic-net:masterfrom Sep 4, 2020
Conversation
portchannel are cleanup in kernel and we get syslog from teammmgrd and teamsyncd process of handling SIGTERM Signed-off-by: Abhishek Dosi <[email protected]>
yxieca
reviewed
Sep 3, 2020
tests/pc/test_po_cleanup.py
Outdated
| ] | ||
| loganalyzer.expect_regex.extend(expectRegex) | ||
|
|
||
| yield |
Collaborator
There was a problem hiding this comment.
I don't think you need to add yield if no clean up is required
yxieca
reviewed
Sep 3, 2020
tests/pc/test_po_cleanup.py
Outdated
|
|
||
|
|
||
| def check_kernel_po_interface_cleaned(duthost): | ||
| res = duthost.shell("ip link show | grep -c PortChannel | cat")["stdout_lines"][0].decode("utf-8") |
Collaborator
There was a problem hiding this comment.
What does this pipe to cat do?
Collaborator
There was a problem hiding this comment.
Are you trying to mute the return errorcode? you can use command_output = self.shell(cmd, module_ignore_errors=True) to ignore the command error code instead.
Contributor
Author
There was a problem hiding this comment.
@yxieca yes, that was the reason for using cat. with output as "0" ansible module return error.
I will update to use module_ignore_errors as True
added 2 commits
September 4, 2020 19:27
and added some ignore syslog messages. Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Abhishek Dosi <[email protected]>
yxieca
approved these changes
Sep 4, 2020
Signed-off-by: Abhishek Dosi <[email protected]>
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
Update submodule ptr for sonic-utilities to include [202111] [portchannel] Added ACL/PBH binding checks to the port before getting added to portchannel (sonic-net#2186) Signed-off-by: Vivek Reddy Karri <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why/What I did:-
Added test case to make sure when teamd feature/service is stop
portchannel are cleanup in kernel and we get syslog
from teammgrd and teamsyncd process of handling
SIGTERM signal
This PR is raise to track the fixes done by PR-
How I verify:
sudo py.test --inventory "../ansible/str" --host-pattern str-s6000-on-2 --module-path "../ansible/library/" --testbed vms13-5-t1-lag --testbed_file "../ansible/testbed.csv" -vvv pc/test_po_cleanup.py
On KVM VS Switch:
sudo py.test --inventory "veos.vtb" --host-pattern vlab-01 --module-path "../ansible/library/" --testbed vms-kvm-t0 --testbed_file "vtestbed.csv" -vvv pc/test_po_cleanup.py --skip_sanity
Currently this test case will fail on master and 201911 as we are waiting for PR#sonic-net/sonic-swss#1407 to be merged.
Update:
With PR#1407 test case is passing:
sudo py.test --inventory "../ansible/str" --host-pattern str-a7050-acs-1 --module-path "../ansible/library/" --testbed vms2-5-t0-7050-1 --testbed_file
"../ansible/testbed.csv" -vvv pc/test_po_cleanup.py --skip_sanity
=============================================================================================== test session starts ===============================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.8.7
rootdir: /data/Networking-acs-sonic-mgmt/tests, inifile: pytest.ini
plugins: ansible-2.2.2, xdist-1.28.0, repeat-0.8.0, forked-1.1.3
collected 1 item
pc/test_po_cleanup.py::test_po_cleanup PASSED [100%]
=========================================================================================== 1 passed in 210.76 seconds ============================================================================================