X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9fcd7e96ad9ed8c7f3a343663a06ee9cbaa15aa9..d14d34b534e6914dea107878212436dd995c6560:/services/api/script/crunch-dispatch.rb diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb index faba54deb9..9fb25664a4 100755 --- a/services/api/script/crunch-dispatch.rb +++ b/services/api/script/crunch-dispatch.rb @@ -1,5 +1,9 @@ #!/usr/bin/env ruby +# We want files written by crunch-dispatch to be writable by other processes +# with the same GID, see bug #7228 +File.umask(0002) + require 'shellwords' include Process @@ -190,7 +194,7 @@ class Dispatcher # Otherwise, return nil. need_procs = NODE_CONSTRAINT_MAP.each_pair.map do |job_key, node_key| Proc.new do |node| - positive_int(node.info[node_key], 0) >= + positive_int(node.properties[node_key], 0) >= positive_int(job.runtime_constraints[job_key], 0) end end @@ -374,6 +378,7 @@ class Dispatcher if Server::Application.config.crunch_job_user cmd_args.unshift("sudo", "-E", "-u", Server::Application.config.crunch_job_user, + "LD_LIBRARY_PATH=#{ENV['LD_LIBRARY_PATH']}", "PATH=#{ENV['PATH']}", "PERLLIB=#{ENV['PERLLIB']}", "PYTHONPATH=#{ENV['PYTHONPATH']}", @@ -746,6 +751,7 @@ class Dispatcher def run act_as_system_user + User.first.group_permissions $stderr.puts "dispatch: ready" while !$signal[:term] or @running.size > 0 read_pipes