Skip to content

[test_vrf][pytest] Terminate all processes with 'exabgp' in the command line#1909

Closed
jleveque wants to merge 1 commit intosonic-net:masterfrom
jleveque:fix_kill_exabgp
Closed

[test_vrf][pytest] Terminate all processes with 'exabgp' in the command line#1909
jleveque wants to merge 1 commit intosonic-net:masterfrom
jleveque:fix_kill_exabgp

Conversation

@jleveque
Copy link
Contributor

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 -f flag 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 two sh exabgp/start.sh processes running. This change ensures all "exabgp" processes as well as the sh exabgp/start.sh processes 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.

# kill exabgp if any
ptfhost.shell("pkill exabgp || true")
# Send SIGTERM to exabgp processes if any
ptfhost.shell("pkill -f exabgp || true")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will kill other exabgp session on the backend network, so it is not feasible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lguohan: There is a backend network on the PTF host?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all exabgp should use the exabgp ansible module to manage. bgp_speaker should also be refactored.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any issue tracking this? I would like to make sure before I close this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find an open issue, so I created one: #1914

@jleveque
Copy link
Contributor Author

Closing this PR and opened an issue to track the proper solution: #1914

@jleveque jleveque closed this Jul 16, 2020
@jleveque jleveque deleted the fix_kill_exabgp branch July 16, 2020 18:34
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
* 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>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
57de13b [config] fix interface IPv6 address removal. (sonic-net#1819) (sonic-net#1909)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants