Skip to content
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

Add on_kill to SSHOperator #40343

Closed
1 task done
potiuk opened this issue Jun 20, 2024 · 4 comments · Fixed by #40377
Closed
1 task done

Add on_kill to SSHOperator #40343

potiuk opened this issue Jun 20, 2024 · 4 comments · Fixed by #40377

Comments

@potiuk
Copy link
Member

potiuk commented Jun 20, 2024

Body

The SSHOperator does not have on_kill method which could deliberately close the ssh client. This means that the klient is close by TERM or even KILL signal when the task is closed and it might leave the connection to SSH still open for quite some time when the server might not realise that the client is closed.

Closing the client gently should improve the speed with which the SSH server will close such stale connections in most cases.

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@vatsrahul1001
Copy link
Collaborator

@potiuk can I take this up?

@MRLab12
Copy link
Contributor

MRLab12 commented Jun 21, 2024

I had started some work on this and did not noticed it was assigned. Happy to hand it off if someone else is already working on it.

@vatsrahul1001
Copy link
Collaborator

vatsrahul1001 commented Jun 22, 2024

@MRLab12 go for it if you already have started on this

@vatsrahul1001 vatsrahul1001 removed their assignment Jun 22, 2024
@MRLab12
Copy link
Contributor

MRLab12 commented Jun 22, 2024

@vatsrahul1001 Thanks!

@potiuk I opened that draft PR to get an idea of where this new on_kill method should be used or if the idea is to just let the user call it when they need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants