Bug #15225

[API] installation gives error: Creating git_internal_dir ''...mkdir: cannot create directory ‘’: No such file or directory

Added by Nico César 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Story points:
-
Release relationship:
Auto

Description

9tee4:/home/nico# apt-get install arvados-api-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
arvados-api-server is already the newest version (1.3.3.20190513140112-8).
0 upgraded, 0 newly installed, 0 to remove and 144 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up arvados-api-server (1.3.3.20190513140112-8) ...

Assumption: nginx is configured to serve Rails from
            /var/www/arvados-api/current
Assumption: nginx and passenger run as www-data

Creating symlinks to configuration in /etc/arvados/api ...... done.
Running bundle install... done.
Ensuring directory and file permissions ...... done.
Running db:migrate...Defaulting to memory cache, because /var/www/arvados-api/current/tmp/cache owner (uid=33) is not me (uid=0)
DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
Please use `config.public_file_server.enabled = false` instead.
 (called from block in <top (required)> at /var/www/arvados-api/current/config/environments/production.rb:12)
 done.
Checking application.yml for completeness...Defaulting to memory cache, because /var/www/arvados-api/current/tmp/cache owner (uid=33) is not me (uid=0)
DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
Please use `config.public_file_server.enabled = false` instead.
 (called from block in <top (required)> at /var/www/arvados-api/current/config/environments/production.rb:12)
 done.
Precompiling assets... done.
Creating git_internal_dir ''...mkdir: cannot create directory ‘’: No such file or directory
 failed.
dpkg: error processing package arvados-api-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 arvados-api-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Related issues

Related to Arvados - Story #13996: [API] Migrate RailsAPI to new cluster config fileResolved03/26/2019

Related to Arvados - Bug #15161: Dev clusters are failing: uninitialized constant ArInternalMetadatum (NameError)Resolved04/30/2019

Associated revisions

Revision ab4fabf3 (diff)
Added by Ward Vandewege 6 months ago

Fix the api server package postinstall script to use `rake config:dump` to get a
value, rather than `rake config:check` which no longer produces output.

closes #15225

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <>

Revision b4eff2bc (diff)
Added by Ward Vandewege 6 months ago

Bump the rails package iteration to 9, for the packaging fix in commit
b4fabf39c7cb1c48a2ba09ba2f45da45b6c4574

refs #15225

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <>

History

#1 Updated by Nico César 6 months ago

9tee4:/var/www/arvados-api/current# bundle exec rake config:check
rake aborted!
API.RailsSessionSecretToken cannot be empty
/var/www/arvados-api/current/lib/config_loader.rb:118:in `block in coercion_and_check'
/var/www/arvados-api/current/lib/config_loader.rb:80:in `each'
/var/www/arvados-api/current/lib/config_loader.rb:80:in `coercion_and_check'
/var/www/arvados-api/current/config/arvados_config.rb:222:in `<top (required)>'
/var/www/arvados-api/current/config/application.rb:48:in `require_relative'
/var/www/arvados-api/current/config/application.rb:48:in `<class:Application>'
/var/www/arvados-api/current/config/application.rb:44:in `<module:Server>'
/var/www/arvados-api/current/config/application.rb:43:in `<top (required)>'
/var/www/arvados-api/current/Rakefile:9:in `require'
/var/www/arvados-api/current/Rakefile:9:in `<top (required)>'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-2.3.5@global/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.5@global/bin/bundle:22:in `load'
/usr/local/rvm/gems/ruby-2.3.5@global/bin/bundle:22:in `<main>'
/usr/local/rvm/gems/ruby-2.3.5/bin/ruby_executable_hooks2.1:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.5/bin/ruby_executable_hooks2.1:15:in `<main>'
(See full trace by running task with --trace)

#2 Updated by Nico César 6 months ago

  • Target version set to To Be Groomed
  • Category set to API
  • Subject changed from [API] [9tee4] installation gives error: Creating git_internal_dir ''...mkdir: cannot create directory ‘’: No such file or directory to [API] installation gives error: Creating git_internal_dir ''...mkdir: cannot create directory ‘’: No such file or directory
  • Project changed from OPS to Arvados

I fixed RailsSessionSecretToken and other missing mandatory configuration

but I still get:

apt-get install arvados-api-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
arvados-api-server is already the newest version (1.3.3.20190513140112-8).
0 upgraded, 0 newly installed, 0 to remove and 143 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up arvados-api-server (1.3.3.20190513140112-8) ...

Assumption: nginx is configured to serve Rails from
            /var/www/arvados-api/current
Assumption: nginx and passenger run as www-data

Creating symlinks to configuration in /etc/arvados/api ...... done.
Running bundle install... done.
Ensuring directory and file permissions ...... done.
Running db:migrate...Defaulting to memory cache, because /var/www/arvados-api/current/tmp/cache owner (uid=33) is not me (uid=0)
DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
Please use `config.public_file_server.enabled = false` instead.
 (called from block in <top (required)> at /var/www/arvados-api/current/config/environments/production.rb:12)
 done.
Checking application.yml for completeness...Defaulting to memory cache, because /var/www/arvados-api/current/tmp/cache owner (uid=33) is not me (uid=0)
DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
Please use `config.public_file_server.enabled = false` instead.
 (called from block in <top (required)> at /var/www/arvados-api/current/config/environments/production.rb:12)
 done.
Precompiling assets... done.
Creating git_internal_dir ''...mkdir: cannot create directory ‘’: No such file or directory
 failed.
dpkg: error processing package arvados-api-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 arvados-api-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

and this is because of

 GIT_INTERNAL_DIR=$($COMMAND_PREFIX bundle exec rake config:check 2>&1 | grep git_internal_dir | awk '{ print $2 }')

git_internal_dir is not output of rake config:check anymore

why we do this in the postinst script of API server? should arvados-git-httpd handle this?

#4 Updated by Ward Vandewege 6 months ago

Nico César wrote:

9tee4:/var/www/arvados-api/current# bundle exec rake config:check
rake aborted!
API.RailsSessionSecretToken cannot be empty

...

You just need to specify the rails environment, no?

RAILS_ENV=production bundle exec rake config:check

#5 Updated by Ward Vandewege 6 months ago

Nico César wrote:

git_internal_dir is not output of rake config:check anymore

It looks like the semantics of rake config:check changed, it doesn't generate any output anymore. It used to print out the entire config. Bug?

This happened in 0cd5f7190f by Lucas

#6 Updated by Ward Vandewege 6 months ago

  • Related to Story #13996: [API] Migrate RailsAPI to new cluster config file added

#7 Updated by Ward Vandewege 6 months ago

  • Target version changed from To Be Groomed to 2019-05-22 Sprint
  • Assigned To set to Ward Vandewege
  • Status changed from New to In Progress

#8 Updated by Ward Vandewege 6 months ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

#9 Updated by Tom Morris 6 months ago

  • Related to Bug #15161: Dev clusters are failing: uninitialized constant ArInternalMetadatum (NameError) added

#10 Updated by Tom Morris 6 months ago

  • Release set to 15

Also available in: Atom PDF