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 1482060 - Error during rendering Satellite Kickstart Default template: ActionView::Template::Error: Safemode doesn't allow to access 'block_pass' on &:present?
Summary: Error during rendering Satellite Kickstart Default template: ActionView::Temp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-16 11:49 UTC by Roman Plevka
Modified: 2021-09-09 12:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 17:00:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1514902 0 high CLOSED host provisioning failed due to an error rendering satellite kickstart default template 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 3404641 0 None None None 2018-05-15 09:17:58 UTC

Internal Links: 1514902

Description Roman Plevka 2017-08-16 11:49:27 UTC
Description of problem:
There is an error preventing Satellite to render a provisioningtemplate on

GET "/unattended/provision?token=..."

request.

2017-08-16 13:08:57 89c60027 [app] [W] There was an error rendering the Satellite Kickstart Default template: 
 | ActionView::Template::Error: Safemode doesn't allow to access 'block_pass' on &:present?
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/parser.rb:135:in `raise_security_error'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/parser.rb:117:in `block (2 levels) in <class:Parser>'
...

This prevents kickstart provisioning to finish.

Version-Release number of selected component (if applicable):
# rpm -qa satellite
satellite-6.3.0-16.0.beta.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. use the default provisioning templates
2. sync a rhel kickstart repo (i used 7.4)
3. try to provision a host (i used libvirt CR, but baremetal should hit this too)

Actual results:
There was an error rendering the Satellite Kickstart Default template: 
 | ActionView::Template::Error: Safemode doesn't allow to access 'block_pass' on &:present?

installation never finishes, falling back to dracut shell

Expected results:
no error, provisioning finishes smoothly

Comment 5 Marek Hulan 2017-08-17 19:32:43 UTC
Fix was cherry-picked to 1.15-stable branch so it will deivered in 1.15.4 but we also need to fix katello templace and theme plugi template.

Comment 7 Roman Plevka 2017-09-27 20:13:04 UTC
VERIFIED

sat6.3.0-17

The templates render correctly, host provisioning works again, no errors in the logs.

Comment 8 Bryan Kearney 2018-02-21 17:00:10 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, 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-2018:0336


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