Error executing foreman-rake after upgrading to 1.19.0

Problem:
I’m updating foreman from 1.18.2 to 1.19.0 on CentOS 7.5 and all the foreman-rake commands return with a stacktrace.

Expected outcome:
Not a stacktrace :slight_smile:

Foreman and Proxy versions:
foreman: 1.19.0
foreman-proxy: 1.19.0

Other relevant data:

# foreman-rake db:migrate --trace
/usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
rake aborted!
TypeError: nil is not a kind of 'Logging::Layout'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appender.rb:161:in `layout='
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appender.rb:45:in `initialize'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/buffering.rb:49:in `initialize'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/io.rb:39:in `initialize'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:60:in `initialize'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:8:in `new'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:8:in `file'
/usr/share/foreman/lib/foreman/logging.rb:182:in `build_file_appender'
/usr/share/foreman/lib/foreman/logging.rb:164:in `build_root_appender'
/usr/share/foreman/lib/foreman/logging.rb:130:in `configure_root_logger'
/usr/share/foreman/lib/foreman/logging.rb:20:in `configure'
/usr/share/foreman/config/application.rb:206:in `<class:Application>'
/usr/share/foreman/config/application.rb:76:in `<module:Foreman>'
/usr/share/foreman/config/application.rb:75:in `<top (required)>'
/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/share/foreman/Rakefile:1:in `<top (required)>'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/opt/rh/rh-ruby24/root/usr/bin/rake:23:in `load'
/opt/rh/rh-ruby24/root/usr/bin/rake:23:in `<main>'

After restoring my snapshot and redoing the upgrades from 1.16.2 -> 1.17.4 -> 1.18.2 -> 1.19.0 everything is working again.

I probably missed a step somewhere in the upgrade process that defined some log configuration in /etc/foreman/settings.yaml.

I’m leaving this post up in case someone might stumble upon this.