Ansible Inventory report failing to render

Problem: Foreman failing to render the Ansible Inventory report.

Both from the web UI (/templates/report_templates) and from the theforeman.foreman.foreman Ansible inventory plugin failed to use the report to generate an inventory.

The web UI failed with

undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet)

And the Ansible inventory plugin failback to the /api/hosts endpoint (which is great but takes forever).

From the web UI if I set option “Content Attributes” to “no” I can create a report no problem so I think it has something to deal with data used by Katello?

A lot of the host records were created by the Ansible module theforeman.foreman.host and without subscribing to Foreman via subscription-manager.

Any hint would be appreciated guys :pray:t3:

Expected outcome: Reporting will continue to work even when some hosts have missing data.

Foreman and Proxy versions: 3.6.1

Foreman and Proxy plugin versions:
From foreman-rake error-fetch_log:

  • foreman-tasks 7.2.1
  • foreman_ansible 11.2.0
  • foreman_discovery 22.0.4
  • foreman_remote_execution 9.1.0
  • foreman_webhooks 3.0.5
  • katello 4.8.1

Distribution and version:
CentOS Stream 8

Other relevant data:

2023-08-17T05:56:18 [I|app|3ff0a39a] Started POST "/templates/report_templates/147-Ansible%20-%20Ansible%20Inventory/schedule_report" for 10.225.4.189 at 2023-08-17 05:56:18 +0000
2023-08-17T05:56:18 [I|app|3ff0a39a] Processing by ReportTemplatesController#schedule_report as HTML
2023-08-17T05:56:18 [I|app|3ff0a39a]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"fB4b6qz49JzlV1P86t4h9xc7tTJr1bTc9sbqt5lfQNQO8EZMucxk+IQch/k7TxPR9maKL/VL+6yb0gsoy5DgiQ==", "report_template_report"=>"[FILTERED]", "commit"=>"Generate", "id"=>"147-Ansible - Ansible Inventory"}
2023-08-17T05:56:18 [I|app|3ff0a39a] Enqueued TemplateRenderJob (Job ID: 03cf9c7d-f6fb-428c-978c-5effb5866807) to Dynflow(default) with arguments: {"template_id"=>"147-Ansible - Ansible Inventory", "gzip"=>false, "send_mail"=>false, "mail_to"=>"foo@example.com", "format"=>"yaml", "input_values"=>{"1"=>{"value"=>"yes"}, "2"=>{"value"=>"yes"}, "3"=>{"value"=>"yes"}, "4"=>{"value"=>"yes"}, "5"=>{"value"=>"no"}, "6"=>{"value"=>"yes"}, "7"=>{"value"=>"no"}, "8"=>{"value"=>"yes"}, "9"=>{"value"=>"no"}, "10"=>{"value"=>"yes"}, "11"=>{"value"=>"yes"}, "12"=>{"value"=>"no"}, "13"=>{"value"=>""}}}, {:user_id=>6}
2023-08-17T05:56:18 [I|app|3ff0a39a] Redirected to <snip>
2023-08-17T05:56:18 [I|app|3ff0a39a] Completed 302 Found in 62ms (ActiveRecord: 6.2ms | Allocations: 27155)
2023-08-17T05:56:18 [I|app|3ff0a39a] Performing TemplateRenderJob (Job ID: 03cf9c7d-f6fb-428c-978c-5effb5866807) from Dynflow(default) enqueued at 2023-08-17T05:56:18Z with arguments: {"template_id"=>"147-Ansible - Ansible Inventory", "gzip"=>false, "send_mail"=>false, "mail_to"=>"foo@example.com", "format"=>"yaml", "input_values"=>{"1"=>{"value"=>"yes"}, "2"=>{"value"=>"yes"}, "3"=>{"value"=>"yes"}, "4"=>{"value"=>"yes"}, "5"=>{"value"=>"no"}, "6"=>{"value"=>"yes"}, "7"=>{"value"=>"no"}, "8"=>{"value"=>"yes"}, "9"=>{"value"=>"no"}, "10"=>{"value"=>"yes"}, "11"=>{"value"=>"yes"}, "12"=>{"value"=>"no"}, "13"=>{"value"=>""}}}, {:user_id=>6}
2023-08-17T05:56:18 [W|app|3ff0a39a] Scoped order is ignored, it's forced to be batch order.
2023-08-17T05:56:19 [E|app|3ff0a39a] Error performing TemplateRenderJob (Job ID: 03cf9c7d-f6fb-428c-978c-5effb5866807) from Dynflow(default) in 1233.4ms: Safemode::NoMethodError (undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet)):
 3ff0a39a | /usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:22:in `method_missing'
 3ff0a39a | Ansible - Ansible Inventory:88:in `block in bind'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `block (2 levels) in each_record'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `each'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `block in each_record'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:245:in `block in in_batches'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:229:in `loop'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:229:in `in_batches'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each_record'
 3ff0a39a | /usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:31:in `method_missing'
 3ff0a39a | Ansible - Ansible Inventory:82:in `bind'
 3ff0a39a | /usr/share/gems/gems/safemode-1.3.7/lib/safemode.rb:51:in `eval'
 3ff0a39a | /usr/share/gems/gems/safemode-1.3.7/lib/safemode.rb:51:in `eval'
 3ff0a39a | /usr/share/foreman/app/services/foreman/renderer/safe_mode_renderer.rb:7:in `render'
 3ff0a39a | /usr/share/foreman/app/services/foreman/renderer/base_renderer.rb:18:in `render'
 3ff0a39a | /usr/share/foreman/app/services/foreman/renderer.rb:46:in `render'
 3ff0a39a | /usr/share/foreman/app/models/template.rb:172:in `render'
 3ff0a39a | /usr/share/foreman/app/models/report_composer.rb:241:in `render'
 3ff0a39a | /usr/share/foreman/app/jobs/template_render_job.rb:12:in `block in perform'
 3ff0a39a | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'
 3ff0a39a | /usr/share/foreman/app/jobs/template_render_job.rb:9:in `perform'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/execution.rb:48:in `block in perform_now'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/i18n-1.12.0/lib/i18n.rb:322:in `with_locale'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/instrumentation.rb:21:in `block in instrument'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/instrumentation.rb:31:in `instrument'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/instrumentation.rb:14:in `block (2 levels) in <module:Instrumentation>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/logging.rb:24:in `tag_logger'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/logging.rb:15:in `block (2 levels) in <module:Logging>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:137:in `run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/execution.rb:47:in `perform_now'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/execution.rb:25:in `block in execute'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/railtie.rb:47:in `block (4 levels) in <class:Railtie>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/execution_wrapper.rb:91:in `wrap'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/reloader.rb:72:in `block in wrap'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/execution_wrapper.rb:91:in `wrap'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/reloader.rb:71:in `wrap'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/railtie.rb:46:in `block (3 levels) in <class:Railtie>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:137:in `run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/execution.rb:23:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/active_job/queue_adapter.rb:47:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:582:in `block (3 levels) in execute_run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action/progress.rb:31:in `with_progress_calculation'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action/progress.rb:17:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/load_setting_values.rb:20:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:15:in `block in run'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:52:in `restore_current_request_id'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:15:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:15:in `block in run'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:15:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `block in run'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in `restore_current_taxonomies'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:32:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:15:in `block in run'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:15:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/world.rb:31:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:581:in `block (2 levels) in execute_run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:580:in `catch'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:580:in `block in execute_run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `block in with_error_handling'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `catch'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `with_error_handling'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:575:in `execute_run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:296:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in `block (2 levels) in execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract.rb:167:in `with_meta_calculation'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block in execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in `open_action'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director.rb:69:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:11:in `block (2 levels) in perform'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors.rb:18:in `run_user_code'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in `block in perform'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:25:in `with_telemetry'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:8:in `perform'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/serialization.rb:27:in `perform'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:196:in `execute_job'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/middleware/chain.rb:133:in `invoke'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:163:in `block in process'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/job_retry.rb:112:in `local'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq.rb:39:in `block in <module:Sidekiq>'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:257:in `stats'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/job_logger.rb:13:in `call'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/job_retry.rb:79:in `global'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:124:in `block in dispatch'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/logger.rb:11:in `with'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/job_logger.rb:33:in `prepare'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:123:in `dispatch'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:162:in `process'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:78:in `process_one'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:68:in `run'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/util.rb:43:in `watchdog'
 3ff0a39a | /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/util.rb:52:in `block in safe_thread'
 3ff0a39a | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-08-17T05:56:19 [E|bac|3ff0a39a] undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet) (Safemode::NoMethodError)
 3ff0a39a | /usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:22:in `method_missing'
 3ff0a39a | Ansible - Ansible Inventory:88:in `block in bind'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `block (2 levels) in each_record'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `each'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `block in each_record'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:245:in `block in in_batches'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:229:in `loop'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:229:in `in_batches'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each'
 3ff0a39a | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each_record'
 3ff0a39a | /usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:31:in `method_missing'
 3ff0a39a | Ansible - Ansible Inventory:82:in `bind'
 3ff0a39a | /usr/share/gems/gems/safemode-1.3.7/lib/safemode.rb:51:in `eval'
 3ff0a39a | /usr/share/foreman/app/services/foreman/renderer/safe_mode_renderer.rb:7:in `render'
 3ff0a39a | /usr/share/foreman/app/services/foreman/renderer/base_renderer.rb:18:in `render'
 3ff0a39a | /usr/share/foreman/app/services/foreman/renderer.rb:46:in `render'
 3ff0a39a | /usr/share/foreman/app/models/template.rb:172:in `render'
 3ff0a39a | /usr/share/foreman/app/models/report_composer.rb:241:in `render'
 3ff0a39a | /usr/share/foreman/app/jobs/template_render_job.rb:12:in `block in perform'
 3ff0a39a | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'
 3ff0a39a | /usr/share/foreman/app/jobs/template_render_job.rb:9:in `perform'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/execution.rb:48:in `block in perform_now'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/i18n-1.12.0/lib/i18n.rb:322:in `with_locale'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/instrumentation.rb:21:in `block in instrument'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/instrumentation.rb:31:in `instrument'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/instrumentation.rb:14:in `block (2 levels) in <module:Instrumentation>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/logging.rb:24:in `tag_logger'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/logging.rb:15:in `block (2 levels) in <module:Logging>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:137:in `run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/execution.rb:47:in `perform_now'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/execution.rb:25:in `block in execute'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/railtie.rb:47:in `block (4 levels) in <class:Railtie>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/execution_wrapper.rb:91:in `wrap'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/reloader.rb:72:in `block in wrap'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/execution_wrapper.rb:91:in `wrap'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/reloader.rb:71:in `wrap'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/railtie.rb:46:in `block (3 levels) in <class:Railtie>'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `instance_exec'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:137:in `run_callbacks'
 3ff0a39a | /usr/share/gems/gems/activejob-6.1.7.3/lib/active_job/execution.rb:23:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/active_job/queue_adapter.rb:47:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:582:in `block (3 levels) in execute_run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action/progress.rb:31:in `with_progress_calculation'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action/progress.rb:17:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/load_setting_values.rb:20:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:15:in `block in run'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:52:in `restore_current_request_id'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:15:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:15:in `block in run'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:15:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `block in run'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in `restore_current_taxonomies'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:32:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:15:in `block in run'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user'
 3ff0a39a | /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:15:in `run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/world.rb:31:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:581:in `block (2 levels) in execute_run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:580:in `catch'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:580:in `block in execute_run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `block in with_error_handling'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `catch'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `with_error_handling'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:575:in `execute_run'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:296:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in `block (2 levels) in execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract.rb:167:in `with_meta_calculation'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block in execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in `open_action'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director.rb:69:in `execute'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:11:in `block (2 levels) in perform'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors.rb:18:in `run_user_code'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in `block in perform'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:25:in `with_telemetry'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:8:in `perform'
 3ff0a39a | /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/serialization.rb:27:in `perform'
 3ff0a39a | [ sidekiq ]
 3ff0a39a | [ concurrent-ruby ]

This is Bug #36684: undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet) (Safemode::NoMethodError) - Katello - Foreman

We merged a fix yesterday and plan to release it as part of 4.8.5

1 Like

Thanks for the quick response Evgeni!

Right now that’s the only issue that would be on 4.8.5. This fix will also be in 4.9.2, whether or not we do a 4.8.5 release.

2 Likes