X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/eda00143401effca0bbc0b2f6e4fde8ee2ede8a0..feaf44094afa6774cd6583f1a121454d6754ba0c:/services/api/lib/crunch_dispatch.rb?ds=sidebyside diff --git a/services/api/lib/crunch_dispatch.rb b/services/api/lib/crunch_dispatch.rb index 24d4d33f30..ce94f737a2 100644 --- a/services/api/lib/crunch_dispatch.rb +++ b/services/api/lib/crunch_dispatch.rb @@ -24,6 +24,7 @@ class CrunchDispatch @docker_bin = ENV['CRUNCH_JOB_DOCKER_BIN'] @docker_run_args = ENV['CRUNCH_JOB_DOCKER_RUN_ARGS'] + @cgroup_root = ENV['CRUNCH_CGROUP_ROOT'] @arvados_internal = Rails.configuration.git_internal_dir if not File.exists? @arvados_internal @@ -384,6 +385,10 @@ class CrunchDispatch '--job', job.uuid, '--git-dir', @arvados_internal] + if @cgroup_root + cmd_args += ['--cgroup-root', @cgroup_root] + end + if @docker_bin cmd_args += ['--docker-bin', @docker_bin] end @@ -448,9 +453,7 @@ class CrunchDispatch partial_line = false skip_counts = false matches = line.match(/^\S+ \S+ \d+ \d+ stderr (.*)/) - if matches and matches[1] and - (matches[1].start_with?('[...]') or matches[1].start_with?('crunchstat [...]')) and - matches[1].end_with?('[...]') + if matches and matches[1] and matches[1].start_with?('[...]') and matches[1].end_with?('[...]') partial_line = true if Time.now > running_job[:log_throttle_partial_line_last_at] + Rails.configuration.crunch_log_partial_line_throttle_period running_job[:log_throttle_partial_line_last_at] = Time.now