Bug 1860430 - 'Host - compare content hosts packages' report: Safemode doesn't allow to access 'version'...
Summary: 'Host - compare content hosts packages' report: Safemode doesn't allow to acc...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Reporting
Version: 6.8.0
Hardware: All
OS: All
Target Milestone: 6.8.0
Assignee: Lukas Zapletal
QA Contact: Lukáš Hellebrandt
Depends On:
TreeView+ depends on / blocked
Reported: 2020-07-24 14:18 UTC by Ranjan Kumar
Modified: 2020-10-27 13:04 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-katello-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-10-27 13:04:32 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 30510 Normal Closed 'Host - compare content hosts packages' report: "Safemode doesn't allow to access 'version' on #<Safemode::ScopeObject>" 2020-10-28 17:44:45 UTC
Foreman Issue Tracker 30561 Normal Closed Expose sortable_version as template macro 2020-10-28 17:44:45 UTC
Red Hat Product Errata RHSA-2020:4366 None None None 2020-10-27 13:04:49 UTC

Description Ranjan Kumar 2020-07-24 14:18:13 UTC
Description of problem: compare content hosts packages report template fails to render, it raises an error "Safemode doesn't allow to access 'version' on #<Safemode::ScopeObject>"
Production log:
2020-07-24T19:40:05 [E|app|c42d31ac] Error performing TemplateRenderJob (Job ID: b1a813d5-0ca1-4ea0-8f3c-f26f5df5545f) from Dynflow(default) in 371.9ms: Safemode::SecurityError (Safemode doesn't allow to access 'version' on #<Safemode::ScopeObject>):
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode/scope.rb:39:in `method_missing'
Host - compare content hosts packages:80:in `block in bind'
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode/jail.rb:31:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode/jail.rb:31:in `method_missing'
Host - compare content hosts packages:69:in `bind'
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode.rb:51:in `eval'
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode.rb:51:in `eval'
/usr/share/foreman/lib/foreman/renderer/safe_mode_renderer.rb:7:in `render'

Version-Release number of selected component (if applicable): Satellite 6.8

How reproducible: Always

Additional info:

Additional info:
[root@dhcp130-171 foreman]# rpm -qa satellite
[root@dhcp130-171 foreman]# rpm -qa foreman
[root@dhcp130-171 foreman]# rpm -qa katello

Comment 1 Marek Hulan 2020-07-28 13:46:40 UTC
It seems this was supposed to be fixed by https://github.com/theforeman/community-templates/pull/711 but it got closed due to the repo merge. lzap, any chance you can reopen this? The key here is, the report today uses `version` macro, but that does not exist. There's `gem_version_compare` instead. Thanks!

Comment 2 Lukas Zapletal 2020-08-05 11:11:01 UTC
Looking into this now, looks like we will have TWO PRs for this BZ.

Comment 3 Bryan Kearney 2020-08-05 12:00:59 UTC
Upstream bug assigned to lzap@redhat.com

Comment 4 Bryan Kearney 2020-08-05 12:01:02 UTC
Upstream bug assigned to lzap@redhat.com

Comment 5 Bryan Kearney 2020-08-11 12:00:55 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30561 has been resolved.

Comment 9 Lukáš Hellebrandt 2020-09-18 09:45:44 UTC
Verified with Sat 6.8 snap 15.

'Host - compare content hosts packages' report generated successfully and with the correct contents.

Comment 12 errata-xmlrpc 2020-10-27 13:04:32 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.8 release), and where to find the updated
files, follow the link below.

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


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