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

Commit

Permalink
exec healthchecks: remove check of executionDriver
Browse files Browse the repository at this point in the history
There are some environments, such as docker-machine on Mac or Docker for
Mac, where `docker exec` works just fine but they seem to return an
empty string for `ExecutionDriver` from the `/info` endpoint in the
Docker Remote API.

This change removes the check that only executes the exec healthcheck
when `executionDriver` starts with `native`, so that exec healthchecks
can still be used (and jobs with them can be deployed) in these
environments.
  • Loading branch information
mattnworb committed May 18, 2016
1 parent aafa74c commit 903594e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,8 @@ public boolean check(final String containerId) {
}

private static boolean compatibleDockerVersion(final DockerClient docker) {
final String executionDriver;
final String apiVersion;
try {
executionDriver = docker.info().executionDriver();
apiVersion = docker.version().apiVersion();
} catch (DockerException e) {
return false;
Expand All @@ -125,9 +123,6 @@ private static boolean compatibleDockerVersion(final DockerClient docker) {
return false;
}

if (Strings.isNullOrEmpty(executionDriver) || !executionDriver.startsWith("native")) {
return false;
}
if (Strings.isNullOrEmpty(apiVersion)) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ private int run0() throws InterruptedException, DockerException {
retryMillis, config, containerId);
Thread.sleep(retryMillis);
}

log.info("healthchecking complete of containerId={} taskConfig={}", containerId, config);
} else {
log.info("no healthchecks configured for containerId={} taskConfig={}",
containerId, config);
}
}

Expand Down

0 comments on commit 903594e

Please sign in to comment.