Actions
Bug #36684
closedundefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet) (Safemode::NoMethodError)
Fixed in Releases:
Found in Releases:
Description
When trying to render the Ansible Inventory template in Foreman (https://github.com/theforeman/foreman/blob/develop/app/views/unattended/report_templates/ansible_-_ansible_inventory.erb) and you have hosts with Content Facets, the rendering fails with the following entry in the logs:
2023-08-16T07:07:53 [E|app|24ce8a15] Error performing TemplateRenderJob (Job ID: bcc04f39-c447-47d4-88a2-c5ee717335ed) from Dynflow(default) in 60.85ms: Safemode::NoMethodError (undefined method '#single_content_view' for Katello:: Host::ContentFacet::Jail (Katello::Host::ContentFacet)): 24ce8a15 | /usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:22:in `method_missing' 24ce8a15 | Ansible - Ansible Inventory:88:in `block in bind' 24ce8a15 | /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' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `each' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `block in each_record' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:245:in `block in in_batches' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:229:in `loop' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:229:in `in_batches' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each_record' 24ce8a15 | /usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:31:in `method_missing' 24ce8a15 | Ansible - Ansible Inventory:82:in `bind' 24ce8a15 | /usr/share/gems/gems/safemode-1.3.7/lib/safemode.rb:51:in `eval' 24ce8a15 | /usr/share/gems/gems/safemode-1.3.7/lib/safemode.rb:51:in `eval' 24ce8a15 | /usr/share/foreman/app/services/foreman/renderer/safe_mode_renderer.rb:7:in `render' 24ce8a15 | /usr/share/foreman/app/services/foreman/renderer/base_renderer.rb:18:in `render' 24ce8a15 | /usr/share/foreman/app/services/foreman/renderer.rb:46:in `render' 24ce8a15 | /usr/share/foreman/app/models/template.rb:172:in `render' 24ce8a15 | /usr/share/foreman/app/models/report_composer.rb:241:in `render' 24ce8a15 | /usr/share/foreman/app/jobs/template_render_job.rb:12:in `block in perform' 24ce8a15 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as' 24ce8a15 | /usr/share/foreman/app/jobs/template_render_job.rb:9:in `perform' … 2023-08-16T07:07:53 [E|bac|24ce8a15] undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet) (Safemode::NoMethodError) 24ce8a15 | /usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:22:in `method_missing' 24ce8a15 | Ansible - Ansible Inventory:88:in `block in bind' 24ce8a15 | /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' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `each' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:40:in `block in each_record' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:245:in `block in in_batches' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:229:in `loop' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches.rb:229:in `in_batches' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each' 24ce8a15 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each_record' 24ce8a15 | /usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:31:in `method_missing' 24ce8a15 | Ansible - Ansible Inventory:82:in `bind' 24ce8a15 | /usr/share/gems/gems/safemode-1.3.7/lib/safemode.rb:51:in `eval' 24ce8a15 | /usr/share/foreman/app/services/foreman/renderer/safe_mode_renderer.rb:7:in `render' 24ce8a15 | /usr/share/foreman/app/services/foreman/renderer/base_renderer.rb:18:in `render' 24ce8a15 | /usr/share/foreman/app/services/foreman/renderer.rb:46:in `render' 24ce8a15 | /usr/share/foreman/app/models/template.rb:172:in `render' 24ce8a15 | /usr/share/foreman/app/models/report_composer.rb:241:in `render' 24ce8a15 | /usr/share/foreman/app/jobs/template_render_job.rb:12:in `block in perform' 24ce8a15 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as' 24ce8a15 | /usr/share/foreman/app/jobs/template_render_job.rb:9:in `perform'
Updated by Evgeni Golov over 1 year ago
- Related to Feature #35660: Update report templates for multi-CV added
Updated by The Foreman Bot over 1 year ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/10699 added
Updated by The Foreman Bot over 1 year ago
- Fixed in Releases Katello 4.10.0 added
Updated by Jeremy Lenz over 1 year ago
- Target version set to Katello 4.8.5
Evgeni is requesting this be backported to 4.8 and 4.9: https://github.com/Katello/katello/pull/10699#issuecomment-1680601338
Updated by Evgeni Golov over 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|05690632cb3d0a501192c6e645fa6ee4466de187.
Updated by William Clark over 1 year ago
- Target version changed from Katello 4.8.5 to Katello 4.9.2
Updated by The Foreman Bot over 1 year ago
- Pull request https://github.com/Katello/katello/pull/10754 added
Updated by The Foreman Bot over 1 year ago
- Pull request deleted (
https://github.com/Katello/katello/pull/10699, https://github.com/Katello/katello/pull/10754)
Actions