Foreman 3.2 & Salt plugin missing report information

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:
image

Distribution and version:
EL 7.9.2009

Other relevant data:

Hi @dannys
Can you please try installing foreman_salt 15.1? It is so far only available for nightly, but I hope that it fixes your issue:

https://yum.theforeman.org/plugins/nightly/el7/x86_64/tfm-rubygem-foreman_salt-15.1.0-1.fm3_3.el7.noarch.rpm

1 Like

Yes, thanks! That one works much better concerning the reports.

Will it be released in the Foreman 3.2 plugins repository?

We should probably do that, yes.

That would be great, I hope that is possible.

@nadjaheitmann Can you help with that or do we need to ping someone else?

I have just created the packaging PRs, now we need to wait for them to be merged :slight_smile:

1 Like

That’s great, thanks!

It looks like there are a lot of open and unhandled merge-requests in the packaging project. What needs to be done to move it forward?

Notify @packaging :slight_smile:

Hey, sorry for the delay,

But now it’s published here https://yum.theforeman.org/plugins/3.2/el7/x86_64/tfm-rubygem-foreman_salt-15.1.0-1.fm3_2.el7.noarch.rpm

@dannys I’ve approved and signed some PR’s that were there for 3.2 and 3.1, they should be landing today in our repos.

The plugins one for 3.2 are already done.

1 Like

Thanks, the new version works well!