Project

General

Profile

Bug #17528

Updated by Peter Amstutz about 3 years ago

 
 When installing workbench1 or rails API workbench on a system without config.yml (or with an incomplete config.yml): 

 <pre> 
 Running transaction 
   Installing : arvados-workbench-2.2.0~dev20210413145725-1.x86_64             1/1  
 WARNING: Unsupported init system. Can't manage web service. 

 WARNING: Web service (Nginx or Apache) not found. 

 To override, set the WEB_SERVICE environment variable to the name of the service 
 hosting the Rails server. 

 For Debian-based systems, then reconfigure this package with dpkg-reconfigure. 

 For RPM-based systems, then reinstall this package. 


 Assumption:    is configured to serve Rails from 
             /var/www/arvados-workbench/current 
 Assumption:    and passenger run as apache 

 Creating symlinks to configuration in /etc/arvados/workbench ...... done. 
 Running bundle install... done. 
 Ensuring directory and file permissions ...... done. 
 Checking configuration for completeness...Called 'load' without the :safe option -- defaulting to safe mode. 
 You can avoid this warning in the future by setting the SafeYAML::OPTIONS[:default_mode] option (to :safe or :unsafe). 
 open /etc/arvados/config.yml: no such file or directory 
 rake aborted! 
 Keep-web service must be configured in Services.WebDAV and/or Services.WebDAVDownload 
 /var/www/arvados-workbench/current/lib/config_validators.rb:23:in `validate_download_config' 
 /var/www/arvados-workbench/current/config/arvados_config.rb:193:in `block in <top (required)>' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/railtie.rb:216:in `instance_eval' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/railtie.rb:216:in `configure' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/railtie.rb:174:in `configure' 
 /var/www/arvados-workbench/current/config/arvados_config.rb:184:in `<top (required)>' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:291:in `block in require' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:257:in `load_dependency' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:291:in `require' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative' 
 /var/www/arvados-workbench/current/config/application.rb:31:in `<class:Application>' 
 /var/www/arvados-workbench/current/config/application.rb:29:in `<module:ArvadosWorkbench>' 
 /var/www/arvados-workbench/current/config/application.rb:28:in `<top (required)>' 
 /var/www/arvados-workbench/current/Rakefile:9:in `require' 
 /var/www/arvados-workbench/current/Rakefile:9:in `<top (required)>' 
 /var/www/arvados-workbench/shared/vendor_bundle/ruby/2.5.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>' 
 /usr/local/rvm/gems/ruby-2.5.8/bin/bundle:23:in `load' 
 /usr/local/rvm/gems/ruby-2.5.8/bin/bundle:23:in `<main>' 
 /usr/local/rvm/gems/ruby-2.5.8/bin/ruby_executable_hooks:24:in `eval' 
 /usr/local/rvm/gems/ruby-2.5.8/bin/ruby_executable_hooks:24:in `<main>' 
 (See full trace by running task with --trace) 
  failed. 
 Precompiling assets... skipped. 

 PLEASE NOTE: 

 The arvados-workbench package was not configured completely because 
 /etc/arvados/config.yml needs some tweaking. 
 Please refer to the documentation at 
 <http://doc.arvados.org/install/install-workbench-app.html#configure> for more details. 

 When config.yml has been modified, 
 reconfigure or reinstall this package. 

   Verifying    : arvados-workbench-2.2.0~dev20210413145725-1.x86_64             1/1  

 Installed: 
   arvados-workbench.x86_64 0:2.2.0~dev20210413145725-1                           

 Complete! 
 </pre> 

 The good: the package installs and tells the user what happened (config not good enough) and what to do (reconfigure/reinstall package). 

 The bad: the package needs to be reconfigured/reinstalled after config.yml is tweaked. 

 The ugly: there is a backtrace printed. 

 To close this bug, at a minimum, we should not print that backtrace. 

 For bonus points: ideally, the package reconfigure/reinstall step wouldn't be needed. Can we create a default that makes sense? Or use package dependencies to make sure config.yml is already in good shape before installation? How do other packages handle this kind of configuration requirement? 

Back