Foreman 3.4 stable - "unknown attribute 'description' for Setting::ForemanHostExtraValidator"

@ekohl,

thanks for clarification. Good that i only destroyed my development system and not the productive.

could you please inform the audience here, if the “packages / plugins” got an update ?
thx :slight_smile:

The two plugins listed here are less active in development (if not even unmaintained). They need a same treatment, stop storing default value of settings to the database. The only solution that comes to my mind until we find active maintainers is to remove the plugin from user setups. The foreman_host_extra_validator does not seem a critical functionality to me, puppetdb_foreman could be problematic for some users.

(sorry, this is just a summary of the situation, not a real solution)

@Marek_Hulan,

yep, but then the users need a hotfix or some advice how this could be solved so that the application is working again :slight_smile:

i don´t want to be rude, but it´s not so cool, if you update a stable release and then the core-packages or plugin-packages are not supported any more and there is no software relation that disables then this paritular plugin or so :slight_smile:

I see the same with the expire host gem

rubygem-foreman_expire_hosts-7.0.4-4.fm3_3.el8.noarch

rake aborted!
ActiveModel::UnknownAttributeError: unknown attribute ‘description’ for Setting::ExpireHosts.
/usr/share/gems/gems/activemodel-6.1.6.1/lib/active_model/attribute_assignment.rb:51:in _assign_attribute' /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:21:in block in _assign_attributes’
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:13:in each' /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:13:in _assign_attributes’
/usr/share/gems/gems/activemodel-6.1.6.1/lib/active_model/attribute_assignment.rb:34:in assign_attributes' /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/core.rb:518:in initialize’
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:72:in new' /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:72:in new’
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/persistence.rb:54:in create!' /usr/share/gems/gems/foreman_expire_hosts-7.0.4/app/models/setting/expire_hosts.rb:18:in block (2 levels) in load_defaults’
/usr/share/gems/gems/foreman_expire_hosts-7.0.4/app/models/setting/expire_hosts.rb:18:in each' /usr/share/gems/gems/foreman_expire_hosts-7.0.4/app/models/setting/expire_hosts.rb:18:in block in load_defaults’
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in block in transaction' /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in block in within_new_transaction’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in block (2 levels) in synchronize' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in handle_interrupt’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in handle_interrupt’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize' /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in within_new_transaction’
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in transaction' /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:209:in transaction’
/usr/share/gems/gems/foreman_expire_hosts-7.0.4/app/models/setting/expire_hosts.rb:10:in load_defaults' /usr/share/foreman/app/services/setting_registry.rb:114:in each’
/usr/share/foreman/app/services/setting_registry.rb:114:in load' /usr/share/foreman/config/initializers/foreman.rb:37:in block in <top (required)>’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:427:in instance_exec' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:427:in block in make_lambda’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:198:in block (2 levels) in halting' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:604:in block (2 levels) in default_terminator’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:603:in catch' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:603:in block in default_terminator’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:199:in block in halting' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:512:in block in invoke_before’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:512:in each' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:512:in invoke_before’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:105:in run_callbacks' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/reloader.rb:88:in prepare!’
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/application/finisher.rb:124:in block in <module:Finisher>' /usr/share/gems/gems/railties-6.1.6.1/lib/rails/initializable.rb:32:in instance_exec’
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/initializable.rb:32:in run' /usr/share/foreman/config/initializers/0_print_time_spent.rb:45:in block in run’
/usr/share/foreman/config/initializers/0_print_time_spent.rb:17:in benchmark' /usr/share/foreman/config/initializers/0_print_time_spent.rb:45:in run’
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/initializable.rb:61:in block in run_initializers' /usr/share/gems/gems/railties-6.1.6.1/lib/rails/initializable.rb:60:in run_initializers’
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/application.rb:391:in initialize!' /usr/share/gems/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in public_send’
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in method_missing' /usr/share/foreman/config/environment.rb:5:in <top (required)>’
/usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in block in require’
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:299:in load_dependency' /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in require’
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/application.rb:367:in require_environment!' /usr/share/gems/gems/railties-6.1.6.1/lib/rails/application.rb:533:in block in run_tasks_blocks’
/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>’
Tasks: TOP => db:seed => db:load_config => environment
(See full trace by running task with --trace)

1 Like

I can totally understand that. We should have formally marked such plugins as “best effort” quality before. I guess a very dirty workaround could be to edit app/models/settings.rb and add a new line after the class Setting < ApplicationRecord adding the attr_accessor :description.

The whole example would be

require 'resolv'

class Setting < ApplicationRecord
  attr_accessor :description
...

Don’t forget to service foreman restart after changing the code if you dare to test that out.

But this is in no way the proper fix.

hi @Marek_Hulan,
thx for the “dirty” workaround. I agree a proper hotfix would be better :slight_smile:

@Marek_Hulan,

i tried the “dirty hotfix” - the ‘description’ issue is gone, but for that the next issue appeared. I would suggest i would be feasible that you raise the priority of that issue, because seems that several Users are affected with different operatingsystems.

Info: Foreman::Rake[db:seed]: Scheduling refresh of Exec[foreman-rake-db:seed]
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: rake aborted!
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: ActiveModel::UnknownAttributeError: unknown attribute 'default' for Setting::ForemanHostExtraValidator.
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activemodel-6.1.6.1/lib/active_model/attribute_assignment.rb:51:in `_assign_attribute'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:21:in `block in _assign_attributes'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:13:in `each'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:13:in `_assign_attributes'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activemodel-6.1.6.1/lib/active_model/attribute_assignment.rb:34:in `assign_attributes'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/core.rb:518:in `initialize'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:72:in `new'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/inheritance.rb:72:in `new'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/persistence.rb:54:in `create!'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/foreman_host_extra_validator-0.1.0/app/models/setting/foreman_host_extra_validator.rb:10:in `block (2 levels) in load_defaults'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/foreman_host_extra_validator-0.1.0/app/models/setting/foreman_host_extra_validator.rb:10:in `each'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/foreman_host_extra_validator-0.1.0/app/models/setting/foreman_host_extra_validator.rb:10:in `block in load_defaults'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:209:in `transaction'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/foreman_host_extra_validator-0.1.0/app/models/setting/foreman_host_extra_validator.rb:7:in `load_defaults'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/foreman/app/services/setting_registry.rb:114:in `each'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/foreman/app/services/setting_registry.rb:114:in `load'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/foreman/config/initializers/foreman.rb:37:in `block in <top (required)>'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:427:in `instance_exec'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:427:in `block in make_lambda'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:603:in `catch'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:603:in `block in default_terminator'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:199:in `block in halting'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:512:in `block in invoke_before'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:512:in `each'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:512:in `invoke_before'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:105:in `run_callbacks'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/reloader.rb:88:in `prepare!'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/initializable.rb:32:in `instance_exec'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/initializable.rb:32:in `run'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/foreman/config/initializers/0_print_time_spent.rb:45:in `block in run'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/foreman/config/initializers/0_print_time_spent.rb:17:in `benchmark'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/foreman/config/initializers/0_print_time_spent.rb:45:in `run'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/initializable.rb:61:in `block in run_initializers'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/initializable.rb:60:in `run_initializers'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/application.rb:391:in `initialize!'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in `public_send'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in `method_missing'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/foreman/config/environment.rb:5:in `<top (required)>'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in `block in require'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:299:in `load_dependency'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in `require'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/application.rb:367:in `require_environment!'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/railties-6.1.6.1/lib/rails/application.rb:533:in `block in run_tasks_blocks'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: Tasks: TOP => db:seed => db:load_config => environment
Notice: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: (See full trace by running task with --trace)
Error: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
Error: /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]

We’re facing a huge issue here … it’s not workiong for puppetdb plugin, and i’ve just encountered same problem with monitoring plugin … upgrading to 3.4 is not an option in this situation.

from my research affected plugins:

  • rubygem-foreman_host_extra_validator
  • rubygem-foreman_monitoring
  • rubygem-puppetdb_foreman
  • rubygem-foreman_expire_hosts

after they are deleted and db:migrate / db:seed was done the foreman-service starts, but you can´t access the web-UI, because Apache config also not working even more.

So from my perspective “Foreman 3.4” is not working pretty well …

Could you try adding :default to the list of attributes?

 attr_accessor :description, :default

TBH I have no idea who maintains the foreman_host_extra_validator plugin at this point, but I see the last commit 3 years ago, most likely it’s abandoned.

@Marek_Hulan,

i tried this. then appeared the following issue:

ActiveModel::UnknownAttributeError: unknown attribute 'full_name' for Setting::ForemanHostExtraValidator.
/usr/share/gems/gems/activemodel-6.1.6.1/lib/active_model/attribute_assignment.rb:51:in `_assign_attribute'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:21:in `block in _assign_attributes'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:13:in `each'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:13:in `_assign_attributes'

then i added “full_name” to the line of code

and this appeared:

ActiveModel::UnknownAttributeError: unknown attribute 'encrypted' for Setting::ForemanHostExtraValidator.
/usr/share/gems/gems/activemodel-6.1.6.1/lib/active_model/attribute_assignment.rb:51:in `_assign_attribute'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:21:in `block in _assign_attributes'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:13:in `each'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/attribute_assignment.rb:13:in `_assign_attributes'
/usr/share/gems/gems/activemodel-6.1.6.1/lib/active_model/attribute_assignment.rb:34:in `assign_attributes'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/core.rb:518:in `initialize'

if i add then also “encrypted” this appears:

ActiveRecord::RecordInvalid: Validation failed: Name has already been taken
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/validations.rb:80:in `raise_validation_error'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/validations.rb:53:in `save!'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:302:in `block in save!'

if i delete the plugin “ForemanHostExtraValidator” then the issue in foreman-rake db:seed appears for the “monitoring”-plugin, deleting that the same issue appeared

attr_accessor :description, :default, :full_name, :encrypted

So this is not working. You have to update for foreman 3.4 your plugins or fix the issues. The Workarounds running in deeper problems and it is not feasible to delete all 4 plugins, because then other problems with the apache apearing.

I don´t want to be rude, but this version shouldn´t have been released. It seems rather untested and makes more problems then solve some. Sorry for my direct words :frowning:

I totally understand your frustration and I’m sorry for the situation you’re at. These plugins are not considered part of the Foreman core project and are not being tested together. It is up to plugin maintainers to keep plugins up to date, sadly the plugins in subject seems rather unmaintained. It’s not in core project maintainers capacity to test and fix each and every plugin with the release, there’s roughly a hundred of them. We should have better set the expectations for the plugins.

Anyway, at this point, it’s really best effort of anyone from the community to provide a fix and release a new version of all of these plugins. I’ll be happy to help if anyone lacks any permissions. Also feel free to let me know if you plan to work on it for better tracking.

  • rubygem-foreman_host_extra_validator - I opened the PR
  • rubygem-foreman_monitoring - I think this one is more actively maintained, if no one fixes that, I can take a look at it some other Friday evening :slight_smile:
  • rubygem-puppetdb_foreman - initial work has been started at this PR so I’m not touching this
  • rubygem-foreman_expire_hosts - I opened the PR

Testing of the PRs appreciated. If they will work, I can prepare the releases. I may need to be added as the rubygems owner though.

1 Like

@Marek_Hulan
i did now the following for testing - deleted all 4 plugins and installed 1 for testing.

  1. rubygem-foreman_host_extra_validator - test seems successfully - output:
[root@pp-tfm-test-01 ~]# foreman-rake db:migrate
[root@pp-tfm-test-01 ~]# foreman-rake db:seed
At least one field decryption failed, check ENCRYPTION_KEY
  1. rubygem-foreman_expire_hosts - test seems successfully - output:
[root@pp-tfm-test-01 ~]# foreman-rake db:migrate
== 20220923181700 FixSettingsCategoryToDsl: migrating =========================
== 20220923181700 FixSettingsCategoryToDsl: migrated (0.0176s) ================

[root@pp-tfm-test-01 ~]# foreman-rake db:seed
At least one field decryption failed, check ENCRYPTION_KEY
User with login admin already exists, not seeding as admin.
  1. rubygem-foreman_monitoring → no PR for testing currently

  2. rubygem-puppetdb_foreman → not tested, changes are to much to test locally, would need here better a package for installing (rpm) … can´t change 35 files fastly without making human mistakes or typos

Ah, I named migrations with the same number, that’s why you didn’t see any migration to happen, I updated the PR here so that it applies too.

I can work on releases for 1 and 2 later this week.

2 Likes

@Marek_Hulan, any updates ?

yum el8 repository - last package update

[rubygem-foreman_expire_hosts-7.0.4-4.fm3_3.el8.noarch.rpm] - 2022-05-10 13:13
[rubygem-foreman_host_extra_validator-0.1.0-5.fm3_3.el8.noarch.rpm] - 2022-05-10 15:14
[rubygem-puppetdb_foreman-5.0.0-4.fm3_3.el8.noarch.rpm] - 2022-04-23 04:44
[rubygem-foreman_monitoring-2.1.0-4.fm3_3.el8.noarch.rpm] - 2022-05-10 13:22

Not yet, sorry, I planned to work on that last Friday but I was sick. I’ll have some time this Friday again. I hope to release foreman_host_extra_validator and foreman_expire_hosts, not sure if there’s any progress on the other two.

@Marek_Hulan, thx for the update.

is there any way we can also push the

forward ? … i mean i have no experience how the development or handling of issues works in that GIT-Projects, but there must be a way to get that also fixed :smiley:

@Marek_Hulan,

just informational -

is merged. hopefully there will be in the next days a CentOS8 (el8) package available.

i guess you are on the other 2 packages.
and then we have to look forward what we can do with the monitoring package, seems not that this will be pushed forward.

@Marek_Hulan,

→ rubygem-puppetdb_foreman got an package update,

so three packages left :slight_smile:

1 Like