adamruzicka / foreman_probing

GNU General Public License v3.0
3 stars 1 forks source link

undefined method `probing_facet' for... #9

Open mkbrown opened 5 years ago

mkbrown commented 5 years ago

Foreman 1.22, your plugin from that repo. The error Oops, we're sorry but something went wrong undefined method `probing_facet' for # is triggered when trying to access the host details page (fundamentally breaking all Foreman host page functions.

In looking through the code, there are a number of cases where probing_facet and probing_facets are used. Perhaps the problem is somewhere in there?

[root@foreman foreman_probing-0.0.2]# grep -r probing_facet *
app/views/foreman_probing/hosts/_open_ports.html.erb:<% if @host.probing_facet.scanned_ports.count.zero? %>
app/views/foreman_probing/hosts/_open_ports.html.erb:        <% @host.probing_facet.scanned_ports.each do |port| %>
app/views/foreman_probing/scans/show.html.erb:                    <td><%= host.probing_facet && host.probing_facet.status %></td>
app/views/foreman_probing/probing_facets/_open_ports_tab_title.html.erb:<% unless @host.probing_facet.nil? %>
app/views/foreman_probing/probing_facets/_open_ports_tab_content.html.erb:<% unless @host.probing_facet.nil? %>
app/overrides/open_ports_tab.rb:  :partial => 'foreman_probing/probing_facets/open_ports_tab_title',
app/overrides/open_ports_tab.rb:  :partial => 'foreman_probing/probing_facets/open_ports_tab_content',
app/models/foreman_probing/port.rb:    belongs_to :probing_facet, :class_name => '::ForemanProbing::ProbingFacet'
app/models/foreman_probing/probing_facet.rb:      'foreman_probing_probing_facets'
app/lib/actions/update_probing_facet.rb:          host.probing_facet ||= ::ForemanProbing::ProbingFacet.new
app/lib/actions/update_probing_facet.rb:          host.probing_facet.status = data['facts'].fetch('status', {}).fetch('state', 'down')
app/lib/actions/update_probing_facet.rb:            update_ports protocol, host.probing_facet
app/lib/actions/update_probing_facet.rb:          host.probing_facet.save!
db/migrate/20170401154714_create_foreman_probing_ports.rb:      t.integer :probing_facet_id, :index => true
db/migrate/20170401154201_create_foreman_probing_facets.rb:    create_table :foreman_probing_probing_facets do |t|

Also, are you still maintaining this plugin? You have a number of your own pull requests and issues open from 2018; it's looking like this may no longer be maintained...

mkbrown commented 5 years ago

On a similar note, scanning non-Linux systems (like AppleTVs, iPads etc.) that are not managed by Foreman seems to trigger an error in the process_host task

NoMethodError: undefined method `smart_proxy_ids' for #