Project

General

Profile

Bug #24943

Older logging.yaml file breaks upgrade to Foreman 1.18

Added by Ewoud Kohl van Wijngaarden 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1619594

Description of problem:

Foreman upgrade to 1.18 fails at Upgrade Step: migrate_foreman

How reproducible:

  • Change logging.yaml while on 1.17
  • Upgrade to 1.18

Additional info:

foreman.log:

[ INFO 2001-01-01T13:56:31 main] Upgrade Step: migrate_foreman...
[DEBUG 2001-01-01T13:56:34 main] /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
[DEBUG 2001-01-01T13:56:34 main] /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here
[DEBUG 2001-01-01T13:56:34 main] /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER
[DEBUG 2001-01-01T13:56:34 main] /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
[DEBUG 2001-01-01T13:56:35 main] rake aborted!
[DEBUG 2001-01-01T13:56:35 main] TypeError: nil is not a kind of 'Logging::Layout'
[DEBUG 2001-01-01T13:56:35 main] /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appender.rb:161:in `layout='
[DEBUG 2001-01-01T13:56:35 main] /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appender.rb:45:in `initialize'
[DEBUG 2001-01-01T13:56:35 main] /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/buffering.rb:49:in `initialize'
[DEBUG 2001-01-01T13:56:35 main] /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/io.rb:39:in `initialize'
[DEBUG 2001-01-01T13:56:35 main] /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:60:in `initialize'
[DEBUG 2001-01-01T13:56:35 main] /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:8:in `new'
[DEBUG 2001-01-01T13:56:35 main] /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/file.rb:8:in `file'
[DEBUG 2001-01-01T13:56:35 main] /usr/share/foreman/lib/foreman/logging.rb:182:in `build_file_appender'
[DEBUG 2001-01-01T13:56:35 main] /usr/share/foreman/lib/foreman/logging.rb:164:in `build_root_appender'
[DEBUG 2001-01-01T13:56:35 main] /usr/share/foreman/lib/foreman/logging.rb:130:in `configure_root_logger'
[DEBUG 2001-01-01T13:56:35 main] /usr/share/foreman/lib/foreman/logging.rb:20:in `configure'
[DEBUG 2001-01-01T13:56:35 main] /usr/share/foreman/config/application.rb:204:in `<class:Application>'
[DEBUG 2001-01-01T13:56:35 main] /usr/share/foreman/config/application.rb:74:in `<module:Foreman>'
[DEBUG 2001-01-01T13:56:35 main] /usr/share/foreman/config/application.rb:73:in `<top (required)>'
[DEBUG 2001-01-01T13:56:35 main] /usr/share/foreman/Rakefile:1:in `<top (required)>'
[DEBUG 2001-01-01T13:56:35 main] /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
[DEBUG 2001-01-01T13:56:35 main] (See full trace by running task with --trace)
[ERROR 2001-01-01T13:56:35 main] foreman-rake db:migrate failed! Check the output for error!
[ERROR 2001-01-01T13:56:35 main] Upgrade step migrate_foreman failed. Check logs for more information.
[DEBUG 2001-01-01T13:56:35 main] Exit with status code: 1 (signal was 1)
[ERROR 2001-01-01T13:56:35 main] Errors encountered during run:
[ERROR 2001-01-01T13:56:35 main] foreman-rake db:migrate failed! Check the output for error!
[ERROR 2001-01-01T13:56:35 main] Upgrade step migrate_foreman failed. Check logs for more information.

Associated revisions

Revision 72094015 (diff)
Added by Ewoud Kohl van Wijngaarden 3 months ago

Fixes #24943 - Treat logging.yaml as non-config

The logging settings can be overridden in settings.yaml. logging.yaml is
only meant for a set of defaults.

History

#1 Updated by The Foreman Bot 3 months ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-packaging/pull/3000 added

#2 Updated by Ewoud Kohl van Wijngaarden 3 months ago

  • Status changed from Ready For Testing to Closed

#3 Updated by Tomer Brisker 2 months ago

  • Fixed in Releases 1.20.0 added

Also available in: Atom PDF