Merge branch 'crunch-dispatch-docker-bin-env' of https://github.com/wtsi-hgi/arvados...
authorTom Clegg <tom@curoverse.com>
Fri, 31 Jul 2015 04:25:23 +0000 (00:25 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 31 Jul 2015 04:25:23 +0000 (00:25 -0400)
services/api/script/crunch-dispatch.rb

index 515bfaada00cf768c602bba154c9045d33cca3f5..be84b54e18b37222763ffd980d3c1c9966c9606f 100755 (executable)
@@ -63,6 +63,8 @@ class Dispatcher
       raise "No CRUNCH_JOB_BIN env var, and crunch-job not in path."
     end
 
+    @docker_bin = (ENV['CRUNCH_JOB_DOCKER_BIN'] || "/usr/bin/docker.io")
+
     @arvados_internal = Rails.configuration.git_internal_dir
     if not File.exists? @arvados_internal
       $stderr.puts `mkdir -p #{@arvados_internal.shellescape} && git init --bare #{@arvados_internal.shellescape}`
@@ -419,7 +421,8 @@ class Dispatcher
       cmd_args += [@crunch_job_bin,
                    '--job-api-token', @authorizations[job.uuid].api_token,
                    '--job', job.uuid,
-                   '--git-dir', @arvados_internal]
+                   '--git-dir', @arvados_internal,
+                   '--docker-bin', @docker_bin]
 
       if @todo_job_retries.include?(job.uuid)
         cmd_args << "--force-unlock"