This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1315754 - 'kickstart_networking_setup' threw an error: undefined method 'present?' for String::Jail (String) while provisioning a host with extra interfaces
'kickstart_networking_setup' threw an error: undefined method 'present?' for ...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning Templates (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: 6.2
Assigned To: Marek Hulan
Sachin Ghai
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-08 09:16 EST by Sachin Ghai
Modified: 2016-07-27 05:05 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:05:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sachin Ghai 2016-03-08 09:16:44 EST
Description of problem: I was configuring alias and vlan interfaces while provisioning a host and provisioning failed with below error:

2016-03-08 08:44:01 [app] [I] Started GET "/unattended/provision?token=bb9a07e8-5425-44d3-b45c-013f9d89d3d5" for 192.168.100.22 at 2016-03-08 08:44:01 -0500
2016-03-08 08:44:01 [app] [I] Processing by UnattendedController#host_template as */*
2016-03-08 08:44:01 [app] [I]   Parameters: {"token"=>"bb9a07e8-5425-44d3-b45c-013f9d89d3d5", "kind"=>"provision"}
2016-03-08 08:44:01 [app] [I] Found mac525400490367.idmqe.lab.eng.bos.redhat.com
2016-03-08 08:44:03 [app] [I]   Rendered inline template (126.6ms)
2016-03-08 08:44:03 [app]2016-03-08 08:44:01 [app] [I] Started GET "/unattended/provision?token=bb9a07e8-5425-44d3-b45c-013f9d89d3d5" for 192.168.100.22 at 2016-03-08 08:44:01 -0500
2016-03-08 08:44:01 [app] [I] Processing by UnattendedController#host_template as */*
2016-03-08 08:44:01 [app] [I]   Parameters: {"token"=>"bb9a07e8-5425-44d3-b45c-013f9d89d3d5", "kind"=>"provision"}
2016-03-08 08:44:01 [app] [I] Found mac525400490367.idmqe.lab.eng.bos.redhat.com
2016-03-08 08:44:03 [app] [I]   Rendered inline template (126.6ms)
2016-03-08 08:44:03 [app] [W] There was an error rendering the Katello Kickstart Default template: 
 | ActionView::Template::Error: The snippet 'kickstart_networking_setup' threw an error: undefined method 'present?' for String::Jail (String)
 | /usr/share/foreman/lib/foreman/renderer.rb:75:in `rescue in snippet'
 | /usr/share/foreman/lib/foreman/renderer.rb:72:in `snippet'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode/scope.rb:37:in `method_missing'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode.rb:141:in `bind'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode.rb:51:in `eval'
 [W] There was an error rendering the Katello Kickstart Default template: 
 | ActionView::Template::Error: The snippet 'kickstart_networking_setup' threw an error: undefined method 'present?' for String::Jail (String)
 | /usr/share/foreman/lib/foreman/renderer.rb:75:in `rescue in snippet'
 | /usr/share/foreman/lib/foreman/renderer.rb:72:in `snippet'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode/scope.rb:37:in `method_missing'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode.rb:141:in `bind'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode.rb:51:in `eval'

Version-Release number of selected component (if applicable):
Sat 6.2 snap2

How reproducible:
always

Steps to Reproduce:
1. provision a host with alias interface so that it uses  'kickstart_networking_setup' scriptlet
2.
3.

Actual results:
| ActionView::Template::Error: The snippet 'kickstart_networking_setup' threw an error: undefined method 'present?' for String::Jail (String)

Expected results:


Additional info:
Comment 2 Marek Hulan 2016-03-09 04:05:49 EST
Fixed in gem safemode 1.2.3, to workaround you can either install the gem from here

    http://koji.katello.org/packages/tfm-rubygem-safemode/1.2.3/

or disable safemode rendering (Settings -> Provisioning). Don't forget to restart httpd afterwards (in both cases)
Comment 4 Sachin Ghai 2016-03-21 05:11:59 EDT
Verified with sat6.2 snap4. The reported issue has been fixed with following :

 ~]# rpm -qa | grep safemode
tfm-rubygem-safemode-1.2.3-1.el7sat.noarch

I can provision the host with configuration of virtual interfaces and didn't see the reported exception related to snippet 'kickstart_networking_setup'
Comment 7 errata-xmlrpc 2016-07-27 05:05:11 EDT
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/RHBA-2016:1500

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