Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Commit

Permalink
agent: Report when container exits in healthchecks (#1202)
Browse files Browse the repository at this point in the history
The `TaskMonitor` has logic to throttle a container if the container
restarts too frequently. Prior to this change, however, the throttling
logic is bypassed when a container exits during healthchecks, since in
that case we throw an exception. The `TaskRunner` should report the
container's exit, even if the container never reached "running".
  • Loading branch information
caipre committed Jan 8, 2018
1 parent 0e2842c commit c8085d6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ private int run0() throws InterruptedException, DockerException {
final String err = "container " + containerId + " exited during health checking. "
+ "Exit code: " + state.exitCode() + ", Config: " + config;
log.warn(err);
listener.exited(state.exitCode());
throw new RuntimeException(err);
}

Expand Down

0 comments on commit c8085d6

Please sign in to comment.