From 24e8b7baa10e5f8d1e5b7544280b7834c969c78f Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Wed, 18 May 2016 16:15:04 +0200 Subject: [PATCH] exec healthchecks: remove check of executionDriver 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. --- .../java/com/spotify/helios/agent/HealthCheckerFactory.java | 5 ----- .../src/main/java/com/spotify/helios/agent/TaskRunner.java | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/helios-services/src/main/java/com/spotify/helios/agent/HealthCheckerFactory.java b/helios-services/src/main/java/com/spotify/helios/agent/HealthCheckerFactory.java index cee0666890..10151c002a 100644 --- a/helios-services/src/main/java/com/spotify/helios/agent/HealthCheckerFactory.java +++ b/helios-services/src/main/java/com/spotify/helios/agent/HealthCheckerFactory.java @@ -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; @@ -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; } diff --git a/helios-services/src/main/java/com/spotify/helios/agent/TaskRunner.java b/helios-services/src/main/java/com/spotify/helios/agent/TaskRunner.java index 1a11403d5d..84bbbb4a87 100644 --- a/helios-services/src/main/java/com/spotify/helios/agent/TaskRunner.java +++ b/helios-services/src/main/java/com/spotify/helios/agent/TaskRunner.java @@ -189,6 +189,10 @@ 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); } }