OOD On Ubuntu 20.04

Good morning!

I am trying to install Open OnDemand as a part of a proof of concept project, but I’m running into an issue. We are using Ubuntu 20.04, and we don’t have a choice of moving to Cent or RHEL. I’m using the playbook to install on Ubuntu, but in trying to build the app I’m hitting a roadblock.

It gets to the step where it builds the program, then fails. It looks like it’s failing on the command

`rake build -mj$(nproc)`

I went into the directory (/tmp/ood-build/ondemand) that it creates to run it by hand to add --trace and see what happens, and I see the following

$ rake build -mj$(nproc) --trace
** Invoke build (first_time)
** Invoke build:all (first_time)
** Invoke build:activejobs (first_time)
** Invoke build:gems (first_time)
** Execute build:gems
cd /tmp/ood-build/ondemand/apps/dashboard
bin/bundle install --jobs 4 --retry 2 --without doc
** Invoke build:dashboard (first_time)
Traceback (most recent call last):
	2: from bin/bundle:3:in `<main>'
	1: from /usr/lib/ruby/2.7.0/rubygems.rb:252:in `bin_path'
/usr/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /tmp/ood-build/ondemand/apps/dashboard/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`
rake aborted!
** Invoke build:gems 
** Previous invocation of build:gems failed 
** Invoke build:shell (first_time)
** Execute build:shell
Command failed with status (1): [bin/bundle install --jobs 4 --retry 2 --wi...]
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/file_utils.rb:67:in `block in create_shell_runner'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/file_utils.rb:57:in `sh'
/tmp/ood-build/ondemand/Rakefile:83:in `block (4 levels) in <top (required)>'
/usr/lib/ruby/2.7.0/fileutils.rb:139:in `chdir'
/usr/lib/ruby/2.7.0/fileutils.rb:139:in `cd'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/file_utils_ext.rb:35:in `chdir'
/tmp/ood-build/ondemand/Rakefile:82:in `block (3 levels) in <top (required)>'
/tmp/ood-build/ondemand/Rakefile:80:in `each'
/tmp/ood-build/ondemand/Rakefile:80:in `block (2 levels) in <top (required)>'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:253:in `block (2 levels) in invoke_prerequisites_concurrently'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:64:in `chore'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:34:in `block in value'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:32:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:32:in `value'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:257:in `reverse_each'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:257:in `invoke_prerequisites_concurrently'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:239:in `invoke_prerequisites'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:253:in `block (2 levels) in invoke_prerequisites_concurrently'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:64:in `chore'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:34:in `block in value'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:32:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:32:in `value'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:257:in `reverse_each'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:257:in `invoke_prerequisites_concurrently'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:239:in `invoke_prerequisites'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:253:in `block (2 levels) in invoke_prerequisites_concurrently'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:64:in `chore'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:34:in `block in value'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:32:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/promise.rb:32:in `value'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:257:in `reverse_each'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:257:in `invoke_prerequisites_concurrently'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:239:in `invoke_prerequisites'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
PASSENGER_APP_ENV=production /tmp/ood-build/ondemand/apps/shell/bin/setup
Tasks: TOP => build => build:all => build:activejobs => build:gems

I’ve tried installing bundler separately from some instructions I’ve found elsewhere, but to no avail. Has anybody else run into this before? Is this a dependency issue since we’re running Ubuntu?

Thank you very much,
David

Hi and welcome!

I can’t replicate in a container. The role should be installing these gems through this task.

This is what’s being executed that’s failing you.

cd /tmp/ood-build/ondemand/apps/dashboard
bin/bundle install

as root.

It attempts to load the gem through Gem.bin_path. Here’s what I get when I execute this.

root@5c3015c2fe78:/tmp/ood-build/ondemand/apps/dashboard# irb 
irb(main):001:0> Gem.bin_path('bundler', 'bundle')
=> "/var/lib/gems/2.7.0/gems/bundler-1.13.7/exe/bundle"
irb(main):002:0> 

That’s likely because that location is the first path in my gem paths when I look at gem env.

  - GEM PATHS:
     - /var/lib/gems/2.7.0
     - /root/.gem/ruby/2.7.0
     - /usr/lib/ruby/gems/2.7.0
     - /usr/share/rubygems-integration/2.7.0
     - /usr/share/rubygems-integration/all

And the installation directory too.

  - INSTALLATION DIRECTORY: /var/lib/gems/2.7.0

And I can see by the timestamps that that gem was installed by me just a little while ago through the role (and the ansible tasks given above).

root@5c3015c2fe78:/tmp/ood-build/ondemand/apps/dashboard# ls /var/lib/gems/2.7.0/gems/bundler-1.13.7/exe/ -lrt
total 12
-rwxr-xr-x. 1 root root 1161 Jul 16 16:50 bundle
-rwxr-xr-x. 1 root root 1439 Jul 16 16:50 bundle_ruby
-rwxr-xr-x. 1 root root   96 Jul 16 16:50 bundler

Are you setting any GEM_PATH or GEM_HOME variables? I would say, try to track down where those tasks installed bundler and look at root’s gem env (or sudo gem env as the case may be). You may have to just set GEM_PATH (it’s just like PATH format, /a/b/c:/other/path). I’ve given my full gem path list above.

Hope that helps!