theforeman / puppetdb_foreman

PuppetDB proxy in Foreman
http://theforeman.org
GNU General Public License v3.0
32 stars 23 forks source link

Unable to upgrade to foreman 3.4 with 6.0.0 version #77

Closed alexdga closed 1 year ago

alexdga commented 1 year ago

With 6.0.0 release, i gave a new try in upgrading foreman to 3.4 version.

foreman-rake db:migrate succeeds with no errors, but running foreman-installer fails :

2022-10-26 10:44:03 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-10-26 10:44:08 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-10-26 10:44:08 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2022-10-26 10:44:15 [NOTICE] [configure] Starting system configuration.
2022-10-26 10:44:22 [NOTICE] [configure] 250 configuration steps out of 774 steps complete.
2022-10-26 10:44:23 [NOTICE] [configure] 500 configuration steps out of 778 steps complete.
2022-10-26 10:45:21 [ERROR ] [configure] Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_enabled' -v 'true'' returned 1: rake aborted!
2022-10-26 10:45:21 [ERROR ] [configure] ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Setting::Puppetdb'. This error is raised because the column 'category' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Setting.inheritance_column to use another column for that information.
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:182:in `rescue in sti_class_for'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:175:in `sti_class_for'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:259:in `find_sti_class'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:247:in `discriminate_class_for_record'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/persistence.rb:257:in `instantiate'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:63:in `block (2 levels) in find_by_sql'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/result.rb:62:in `block in each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/result.rb:62:in `each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/result.rb:62:in `each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:63:in `map'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:63:in `block in find_by_sql'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:61:in `find_by_sql'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:843:in `block in exec_queries'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:861:in `skip_query_cache_if_necessary'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:828:in `exec_queries'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:631:in `load'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:249:in `records'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation/finder_methods.rb:524:in `find_take'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation/finder_methods.rb:98:in `take'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation/finder_methods.rb:81:in `find_by'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:22:in `find_by'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/core.rb:350:in `find_by'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/app/services/setting_registry.rb:178:in `_find_or_new_db_record'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/app/services/setting_registry.rb:82:in `set_user_value'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:111:in `block in run_key_values'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:100:in `each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:100:in `run_key_values'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:77:in `run'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:165:in `block in <top (required)>'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
2022-10-26 10:45:21 [ERROR ] [configure]
2022-10-26 10:45:21 [ERROR ] [configure] Caused by:
2022-10-26 10:45:21 [ERROR ] [configure] NameError: uninitialized constant Setting::Puppetdb
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/foreman_hooks-0.3.17/lib/foreman_hooks/as_dependencies_hook.rb:4:in `load_missing_constant'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/inflector/methods.rb:301:in `const_get'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/inflector/methods.rb:301:in `block in constantize'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/inflector/methods.rb:284:in `each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/inflector/methods.rb:284:in `inject'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/inflector/methods.rb:284:in `constantize'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:177:in `sti_class_for'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:259:in `find_sti_class'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:247:in `discriminate_class_for_record'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/persistence.rb:257:in `instantiate'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:63:in `block (2 levels) in find_by_sql'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/result.rb:62:in `block in each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/result.rb:62:in `each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/result.rb:62:in `each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:63:in `map'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:63:in `block in find_by_sql'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:61:in `find_by_sql'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:843:in `block in exec_queries'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:861:in `skip_query_cache_if_necessary'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:828:in `exec_queries'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:631:in `load'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation.rb:249:in `records'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation/finder_methods.rb:524:in `find_take'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation/finder_methods.rb:98:in `take'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/relation/finder_methods.rb:81:in `find_by'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/querying.rb:22:in `find_by'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/core.rb:350:in `find_by'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/app/services/setting_registry.rb:178:in `_find_or_new_db_record'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/app/services/setting_registry.rb:82:in `set_user_value'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:111:in `block in run_key_values'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:100:in `each'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:100:in `run_key_values'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:77:in `run'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/foreman/lib/tasks/config.rake:165:in `block in <top (required)>'
2022-10-26 10:45:21 [ERROR ] [configure] /usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
2022-10-26 10:45:21 [ERROR ] [configure] Tasks: TOP => config
2022-10-26 10:45:21 [ERROR ] [configure] (See full trace by running task with --trace)
2022-10-26 10:45:21 [ERROR ] [configure] /Stage[main]/Foreman::Plugin::Puppetdb/Foreman_config_entry[puppetdb_enabled]/value: change from 'false' to 'true' failed: Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_enabled' -v 'true'' returned 1: rake aborted!
2022-10-26 10:45:21 [ERROR ] [configure] ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Setting::Puppetdb'. This error is raised because the column 'category' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Setting.inheritance_column to use another column for that information.