Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2232370 - undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet) (Safemode::NoMethodError)
Summary: undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 6.14.0
Assignee: Evgeni Golov
QA Contact: David Moore
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-16 14:17 UTC by Evgeni Golov
Modified: 2024-02-08 19:31 UTC (History)
5 users (show)

Fixed In Version: rubygem-katello-4.9.0.14-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:20:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36684 0 Normal Closed undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet) (Safemode::N... 2023-08-16 14:17:21 UTC
Red Hat Issue Tracker SAT-19607 0 None None None 2023-08-16 15:13:31 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:20:44 UTC

Description Evgeni Golov 2023-08-16 14:17:20 UTC
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:

<pre>
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'
</pre>

Comment 1 Evgeni Golov 2023-08-16 14:17:24 UTC
Created from redmine issue https://projects.theforeman.org/issues/36684

Comment 2 Evgeni Golov 2023-08-16 14:17:25 UTC
Upstream bug assigned to egolov

Comment 3 Evgeni Golov 2023-08-16 14:18:35 UTC
This breaks the Ansible Inventory report and thus integration with AAP and friends on 6.14.

Comment 4 Bryan Kearney 2023-08-16 16:03:49 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36684 has been resolved.

Comment 10 errata-xmlrpc 2023-11-08 14:20:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.14 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6818


Note You need to log in before you can comment on or make changes to this bug.