-
Notifications
You must be signed in to change notification settings - Fork 8
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
Cleanup running containers on the Control-C signal #422
Cleanup running containers on the Control-C signal #422
Conversation
Tested while multiple containers were running on all build hosts. |
54b622f
to
770ffb1
Compare
284f396
to
752d2fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't done any testing yet but already found some potential issues in the code.
4642a14
to
9e52a33
Compare
8bffd94
to
5a46550
Compare
- Add the `signal` feature to `tokio` to interrupt and handle the Control-C signal in Butido. - Add Control-C signal handling into the `Orchestrator`. - Implement `Drop` on the `JobHandle` to ensure container cleanup. Fixes science-computing#409 Signed-off-by: Nico Steinle <[email protected]>
5a46550
to
b70bca2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code LGTM now. Thanks!
@@ -69,7 +69,8 @@ shiplift = "0.7" | |||
syntect = "5" | |||
tar = "0.4" | |||
terminal_size = "0.4" | |||
tokio = { version = "1", features = ["macros", "fs", "process", "io-util", "time"] } | |||
tokio = { version = "1", features = ["macros", "fs", "process", "io-util", "signal", "time"] } | |||
tokio-util = "0.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This breaks the alphabetical ordering in the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested again.
Containers were stopped as expected.
Thanks!
106a4da
signal
feature totokio
to interrupt and handle the Control-C signal in Butido.Orchestrator
.Drop
on theJobHandle
to ensure container cleanup.This is a working draft pr for testing purposes and still missing some features.