Hide Forgot
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 satellite-6.8.0-0.7.beta.el7sat.noarch [root@dhcp130-171 foreman]# rpm -qa foreman foreman-2.1.0.1-1.el7sat.noarch [root@dhcp130-171 foreman]# rpm -qa katello katello-3.16.0-0.4.rc4.el7sat.noarch
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!
Looking into this now, looks like we will have TWO PRs for this BZ.
Upstream bug assigned to lzap@redhat.com
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30561 has been resolved.
Verified with Sat 6.8 snap 15. 'Host - compare content hosts packages' report generated successfully and with the correct contents.
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. https://access.redhat.com/errata/RHSA-2020:4366