[test_vrf][pytest] Terminate all processes with 'exabgp' in the command line#1909
[test_vrf][pytest] Terminate all processes with 'exabgp' in the command line#1909jleveque wants to merge 1 commit intosonic-net:masterfrom jleveque:fix_kill_exabgp
Conversation
| # kill exabgp if any | ||
| ptfhost.shell("pkill exabgp || true") | ||
| # Send SIGTERM to exabgp processes if any | ||
| ptfhost.shell("pkill -f exabgp || true") |
There was a problem hiding this comment.
this will kill other exabgp session on the backend network, so it is not feasible.
There was a problem hiding this comment.
@lguohan: There is a backend network on the PTF host?
There was a problem hiding this comment.
Then I believe the proper fix here is for the VRF test to utilize the exabgp PyTest fixture for exabgp which is used by the PyTest version of the BGP speaker test.
There was a problem hiding this comment.
all exabgp should use the exabgp ansible module to manage. bgp_speaker should also be refactored.
There was a problem hiding this comment.
Is there any issue tracking this? I would like to make sure before I close this PR.
There was a problem hiding this comment.
I could not find an open issue, so I created one: #1914
|
Closing this PR and opened an issue to track the proper solution: #1914 |
* c3691d3 [202012][pfcwd] Convert polling interval from ms to us in LUA scripts (sonic-net#1909) * 549c804 Mux state order change (sonic-net#1902) * 6b0b2c4 Update acl type check logic (sonic-net#1886) Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
57de13b [config] fix interface IPv6 address removal. (sonic-net#1819) (sonic-net#1909)
The test_vrf PyTest is using the same mechanism the old Ansible Playbook version of the BGP speaker test used to control exabgp, thus it requires the same patch I added here: #1908.
It appears that there is now a PyTest fixture for exabgp which is used by the PyTest version of the BGP speaker test. Maybe that should be used here instead?
Add
-fflag to pkill so that it will send the signal to processes where "exabgp" appears anywhere in the command line. Without this flag, it only sends the signal to processes where "exabgp" is the actual file being executed, thus leaving twosh exabgp/start.shprocesses running. This change ensures all "exabgp" processes as well as thesh exabgp/start.shprocesses are stopped.Also update comment to be more precise about what signal is being sent, in case we need to be more forceful in the future, we could send SIGKILL instead.