Bug #7880

[Crunch] crunch-dispatch should run the bundled version of crunch-job specified by Gemfile.lock

Added by Tom Clegg about 5 years ago. Updated about 5 years ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
Story points:


Currently, if $CRUNCH_JOB_BIN is not set, source:services/api/lib/crunch_dispatch.rb uses `which arv-crunch-job` to find the right executable (arv-crunch-job is a Ruby program that invokes a Perl program: it exists because gem/bundler cannot install non-Ruby executables). However, `which arv-crunch-job` only gives us a path to a rubygems wrapper which selects a suitable version at runtime -- it's not a specific version of the arv-crunch-job program itself. When we run that wrapper, we use sudo, which (apparently) modifies the environment such that the wrapper no longer uses our Gemfile.lock to select a version: instead, it chooses one (presumably the newest installed version) as if we weren't using bundler.

Possible solutions:
  • Modify the sudo invocation such that `sudo arv-crunch-job` runs the bundled version -- details TBD, but taking care not to make #4750 any worse.
  • Find the real crunch-job program, not the wrapper. For example, add an "arv-which-crunch-job" program that's just like arv-crunch-job but prints the path to crunch-job instead of executing it, and use `arv-which-crunch-job` instead of `which arv-crunch-job`.


#1 Updated by Brett Smith about 5 years ago

  • Target version set to Arvados Future Sprints

Also available in: Atom PDF