forked from stjude-rust-labs/crankshaft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improvements to the Docker backend (stjude-rust-labs#16)
* fix: use a oneshot channel instead of a callback. This changes the `Backend` trait to take a oneshot `Sender` rather than a callback as the caller only cares about when the first task execution has started. This simplifies some integration with `wdl-engine`. * feat: implement CPU and memory resource limits for the Docker backend. Adds CPU and memory limits representation to `Resources` and `Defaults`. In the Docker backend, these are now passed through to service creation for Swarm support. This commit also fixes the `Into<HostConfig>` implementation for `Resources` so that it sets the proper fields in the request. * fix: fixes to the Docker backend. Fixed the following: * non-zero exit codes were showing up as signals due to not properly formatting a wait exit status. * the default entry point should be specified when creating the container to override any entry point specified in the image, as the full command is being provided for a task. * `bollard` turns non-zero exit codes from an exited container into a wait error; we need to handle that error and treat it as a successful wait with a non-zero exit code. * fix: correct the use of `memory_reservation` in container HostConfig. The Docker `memory_reservation` setting acts as a memory soft limit used in OOM conditions. Crankshaft was treating it like a minimum requirement for memory, which only makes sense when Docker is operating in a swarm. The fix is to remove setting the option. * chore: code review feedback. * chore: update CHANGELOGs.
- Loading branch information
1 parent
5c32b29
commit 3f71486
Showing
19 changed files
with
266 additions
and
115 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.