Problem:
I’ve installed a fresh Foreman 3.2 with the Foreman-Salt plugin and with this version the report details of a host are missing. It shows “Nothing to show” instead:
The production.log shows the following error when the upload-salt-reports
command is executed, which seems related:
2022-04-20T12:03:40 [E|bac|490308e6] undefined method `find_or_create' for Source(id: integer, value: text):Class
490308e6 | Did you mean? find_or_create_by
490308e6 | find_or_create_by!
490308e6 | first_or_create (NoMethodError)
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:75:in `block in import_log_messages'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:65:in `each'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:65:in `import_log_messages'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:157:in `process_normal'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:40:in `import'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:11:in `block in import'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:9:in `each'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:9:in `map'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/services/foreman_salt/report_importer.rb:9:in `import'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/lib/actions/foreman_salt/report_import.rb:14:in `block in run'
490308e6 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'
490308e6 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
490308e6 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_salt-14.1.0/app/lib/actions/foreman_salt/report_import.rb:13:in `run'
Am I missing something in the installation?
Expected outcome:
With Foreman 3.1 (and the same Foreman-Salt plugin version) reports are shown as expected:
Foreman and Proxy versions:
Version 3.2.0
Foreman and Proxy plugin versions:
Smart-proxy services:
Distribution and version:
EL 7.9.2009
Other relevant data: