Project

General

Profile

Actions

Bug #25606

closed

NoMethodError: undefined method `discovered_host_path' during foreman-rake reports:daily

Added by Chun-Liang Lin almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Discovery plugin
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Hi,

We can't run the foreman-rake reports:daily after we upgraded to Foreman 1.18.2.
We use the foreman_discovery plug-in 12.0.2.
If I delete all of the discovered hosts, I can run the foreman-rake reports:daily successfully.
By the trace file, I think it's related with the foreman_discovery.

/usr/sbin/foreman-rake reports:daily --trace
  • Invoke reports:daily (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute reports:daily
    rake aborted!
    ActionView::Template::Error: undefined method `discovered_host_path' for #<#<Class:0x0055b30b80df18>:0x0055b30b82c8f0>
    Did you mean? discovered_host_url
    discovered_hosts_url
    /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/views/discovered_mailer/_discovered_host.html.erb:3:in `_vendor_ruby_______gems_foreman_discovery________app_views_discovered_mailer__discovered_host_html_erb___2813286562714300405_47113752737640'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:342:in `block in render_partial'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:331:in `render_partial'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:310:in `render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:47:in `render_partial'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:21:in `render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/helpers/rendering_helper.rb:32:in `render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/views/discovered_mailer/discovered_summary.html.erb:26:in `block in vendor_ruby______gems_foreman_discovery________app_views_discovered_mailer_discovered_summary_html_erb__780305276888968880_47113740253800'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/views/discovered_mailer/discovered_summary.html.erb:24:in `_vendor_ruby_______gems_foreman_discovery________app_views_discovered_mailer_discovered_summary_html_erb__780305276888968880_47113740253800'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:52:in `block (2 levels) in render_template'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:51:in `block in render_template'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:50:in `render_template'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:14:in `render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:42:in `render_template'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:23:in `render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/rendering.rb:103:in `_render_template'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/rendering.rb:83:in `render_to_body'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/rendering.rb:24:in `render'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:945:in `block in collect_responses_from_templates'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:942:in `each'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:942:in `each'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:942:in `map'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:942:in `collect_responses_from_templates'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:927:in `collect_responses'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:830:in `mail'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/roadie-rails-1.3.0/lib/roadie/rails/automatic.rb:5:in `mail'
    /usr/share/foreman/app/mailers/application_mailer.rb:15:in `mail'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/mailers/discovered_mailer.rb:16:in `block in discovered_summary'
    /usr/share/foreman/app/mailers/application_mailer.rb:36:in `set_locale_for'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/mailers/discovered_mailer.rb:14:in `discovered_summary'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:186:in `process_action'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:131:in `run_callbacks'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:19:in `process_action'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:124:in `process'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/rescuable.rb:23:in `block in process'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/rescuable.rb:15:in `handle_exceptions'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/rescuable.rb:22:in `process'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/rendering.rb:30:in `process'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:609:in `block in process'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:608:in `process'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/message_delivery.rb:105:in `block in processed_mailer'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/message_delivery.rb:104:in `tap'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/message_delivery.rb:104:in `processed_mailer'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/message_delivery.rb:95:in `deliver_now'
    /usr/share/foreman/app/models/mail_notifications/mail_notification.rb:52:in `deliver'
    /usr/share/foreman/app/models/user_mail_notification.rb:13:in `deliver'
    /usr/share/foreman/lib/tasks/reports.rake:100:in `block (2 levels) in process_notifications'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
    /usr/share/foreman/lib/tasks/reports.rake:99:in `block in process_notifications'
    /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:94:in `as'
    /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:100:in `as_anonymous_admin'
    /usr/share/foreman/lib/tasks/reports.rake:98:in `process_notifications'
    /usr/share/foreman/lib/tasks/reports.rake:106:in `block (2 levels) in <top (required)>'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `each'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
    /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:182:in `invoke'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:160:in `invoke_task'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in top_level'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_threads'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:83:in `block in run'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
    /usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
    /usr/bin/rake:27:in `<main>'

Caused by:
NoMethodError: undefined method `discovered_host_path' for #<#<Class:0x0055b30b80df18>:0x0055b30b82c8f0>
Did you mean? discovered_host_url
discovered_hosts_url
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/views/discovered_mailer/_discovered_host.html.erb:3:in `_vendor_ruby_______gems_foreman_discovery________app_views_discovered_mailer__discovered_host_html_erb___2813286562714300405_47113752737640'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:342:in `block in render_partial'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:331:in `render_partial'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/partial_renderer.rb:310:in `render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:47:in `render_partial'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:21:in `render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/helpers/rendering_helper.rb:32:in `render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/views/discovered_mailer/discovered_summary.html.erb:26:in `block in vendor_ruby______gems_foreman_discovery________app_views_discovered_mailer_discovered_summary_html_erb__780305276888968880_47113740253800'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/views/discovered_mailer/discovered_summary.html.erb:24:in `_vendor_ruby_______gems_foreman_discovery________app_views_discovered_mailer_discovered_summary_html_erb__780305276888968880_47113740253800'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:52:in `block (2 levels) in render_template'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:51:in `block in render_template'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:50:in `render_template'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/template_renderer.rb:14:in `render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:42:in `render_template'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/renderer/renderer.rb:23:in `render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/rendering.rb:103:in `_render_template'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/rendering.rb:83:in `render_to_body'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/rendering.rb:24:in `render'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:945:in `block in collect_responses_from_templates'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:942:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:942:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:942:in `map'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:942:in `collect_responses_from_templates'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:927:in `collect_responses'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:830:in `mail'
/usr/share/foreman/vendor/ruby/2.3.0/gems/roadie-rails-1.3.0/lib/roadie/rails/automatic.rb:5:in `mail'
/usr/share/foreman/app/mailers/application_mailer.rb:15:in `mail'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/mailers/discovered_mailer.rb:16:in `block in discovered_summary'
/usr/share/foreman/app/mailers/application_mailer.rb:36:in `set_locale_for'
/usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/mailers/discovered_mailer.rb:14:in `discovered_summary'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:186:in `process_action'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:131:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:19:in `process_action'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:124:in `process'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/rescuable.rb:23:in `block in process'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/rescuable.rb:15:in `handle_exceptions'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/rescuable.rb:22:in `process'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionview-5.1.6/lib/action_view/rendering.rb:30:in `process'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:609:in `block in process'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166:in `instrument'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/base.rb:608:in `process'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/message_delivery.rb:105:in `block in processed_mailer'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/message_delivery.rb:104:in `tap'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/message_delivery.rb:104:in `processed_mailer'
/usr/share/foreman/vendor/ruby/2.3.0/gems/actionmailer-5.1.6/lib/action_mailer/message_delivery.rb:95:in `deliver_now'
/usr/share/foreman/app/models/mail_notifications/mail_notification.rb:52:in `deliver'
/usr/share/foreman/app/models/user_mail_notification.rb:13:in `deliver'
/usr/share/foreman/lib/tasks/reports.rake:100:in `block (2 levels) in process_notifications'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/usr/share/foreman/lib/tasks/reports.rake:99:in `block in process_notifications'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:94:in `as'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:100:in `as_anonymous_admin'
/usr/share/foreman/lib/tasks/reports.rake:98:in `process_notifications'
/usr/share/foreman/lib/tasks/reports.rake:106:in `block (2 levels) in <top (required)>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task.rb:182:in `invoke'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:160:in `invoke_task'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_threads'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:83:in `block in run'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/share/foreman/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/usr/bin/rake:27:in `<main>'
Tasks: TOP => reports:daily

Best Regards,
Chun-Liang Lin

Actions #1

Updated by Lukas Zapletal almost 6 years ago

  • Project changed from Foreman to Discovery
  • Subject changed from Can't run foreman-rake reports:daily successfully to NoMethodError: undefined method `discovered_host_path' during foreman-rake reports:daily
  • Category set to Discovery plugin
  • Assignee set to Lukas Zapletal
  • Target version set to Discovery Plugin 15.0
  • Triaged changed from No to Yes
  • Found in Releases Discovery Plugin 12.0.2 added

Hey, it's a bug!

Actions #2

Updated by Lukas Zapletal almost 6 years ago

  • Target version changed from Discovery Plugin 15.0 to Discovery Plugin 14.0
  • Fixed in Releases Discovery Plugin 15.0 added
Actions #3

Updated by The Foreman Bot almost 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/465 added
Actions #4

Updated by Lukas Zapletal almost 6 years ago

  • Target version changed from Discovery Plugin 14.0 to Discovery Plugin 14.0.1

Patch is up, we will be fixing this in 14.0.1.

Actions #5

Updated by Anonymous almost 6 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Chun-Liang Lin almost 6 years ago

Thanks your prompt support.

I can't find the files in the https://github.com/theforeman/foreman_discovery/pull/465/files in my environment.

so I have modified these files
vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/views/discovered_mailer/_discovered_host.html.erb
vendor/ruby/2.3.0/gems/foreman_discovery-12.0.2/app/views/discovered_mailer/discovered_summary.text.erb

Now, I can run the foreman-rake reports:daily now.

Actions #7

Updated by Lukas Zapletal almost 6 years ago

  • Fixed in Releases Discovery Plugin 14.0.1 added
  • Fixed in Releases deleted (Discovery Plugin 15.0)
Actions

Also available in: Atom PDF