Skip to content

Fixed exception during SSH runner socket cleanup #4974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 29, 2020

Conversation

nmaludy
Copy link
Member

@nmaludy nmaludy commented Jun 25, 2020

Closes #4973

Regression introduced here: #4881

The self.socket object is not a process and doesn't have a member called process, so calling self.socket.process.xxx throws an exception when closing the SSH client.

Looks like we were also failing to cleanup the self.bastion_socket instance, so added that as well.

@nmaludy nmaludy added the bug label Jun 25, 2020
@nmaludy nmaludy added this to the 3.3.0 milestone Jun 25, 2020
@nmaludy nmaludy requested review from blag, punkrokk and arm4b June 25, 2020 17:28
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines. Good size to review. label Jun 25, 2020
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

Good find!

Copy link
Member

@punkrokk punkrokk left a comment

Choose a reason for hiding this comment

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

Great find!

@igcherkaev
Copy link

After a couple of days running with the fix applied st2actionrunner is no longer leaking sockets and CPU utilization has been steady:

image

@igcherkaev
Copy link

igcherkaev commented Jun 26, 2020

Previously, it would look like this:
image

And we had to restart actionrunners to calm it down.

@nmaludy nmaludy merged commit 8f507d6 into master Jun 29, 2020
@nmaludy nmaludy deleted the hotfix/paramiko-bastion-cleanup branch June 29, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug regression size/M PR that changes 30-99 lines. Good size to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When specifying a SSH bastion host st2actionrunner leaks sockets and throws exceptions
4 participants