Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514902 - host provisioning failed due to an error rendering satellite kickstart default template
Summary: host provisioning failed due to an error rendering satellite kickstart defaul...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning Templates
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-19 11:14 UTC by Nikhil Kathole
Modified: 2019-04-01 20:27 UTC (History)
3 users (show)

Fixed In Version: foreman-1.15.6.11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 17:08:53 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1482060 None CLOSED Error during rendering Satellite Kickstart Default template: ActionView::Template::Error: Safemode doesn't allow to acce... 2019-03-27 20:37:37 UTC
Red Hat Bugzilla 1511158 None CLOSED puppet4 host is setup to use default puppet3 puppetdirs 2019-03-27 20:37:37 UTC

Internal Links: 1482060 1511158

Description Nikhil Kathole 2017-11-19 11:14:16 UTC
Description of problem: While provisioning a host using Libvirt Compute resource, there was 500 internal server error: the requested URL returned error.
Failed to kickstart from http://hostname/unattended/provision?token=.....

Version-Release number of selected component (if applicable): Satellite 6.3 snap 25


How reproducible:always


Steps to Reproduce:
1. Use the default provisioning templates
2. Try to provision a host with Libvirt compute resource

Actual results:
The requested URL returned error : 500 Internal Server Error
Error as failed to kickstart from http://hostname/unattended/provision?token=.....

and host gave dracut shell 

Expected results:
Host should provision successfully.

Additional info:

Comment 3 Sachin Ghai 2017-11-20 10:35:42 UTC
I think something wrong w/ Satellite Kickstart Default template:

2017-11-20 05:32:49 5ab6180b [templates] [I] Rendering template 'puppet.conf'
2017-11-20 05:32:49 5ab6180b [app] [I]   Rendered inline template (370.3ms)
2017-11-20 05:32:49 5ab6180b [app] [W] There was an error rendering the Satellite Kickstart Default template: 
 | ActionView::Template::Error: ERF42-7327 [Foreman::Exception]: The snippet 'puppet.conf' threw an error: wrong number of arguments (given 0, expected 1)
 | /usr/share/foreman/lib/foreman/renderer.rb:44:in `host_param_true?'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/scope.rb:37:in `method_missing'
 | puppet.conf:55:in `bind'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
 | /usr/share/foreman/lib/foreman/renderer.rb:56:in `render_safe'
 | /usr/share/foreman/lib/foreman/renderer.rb:175:in `unattended_render'
 | /usr/share/foreman/lib/foreman/renderer.rb:121:in `snippet'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/scope.rb:37:in `method_missing'
 | puppet_setup:113:in `bind'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
 | /usr/share/foreman/lib/foreman/renderer.rb:56:in `render_safe'
 | /usr/share/foreman/lib/foreman/renderer.rb:175:in `unattended_render'
 | /usr/share/foreman/lib/foreman/renderer.rb:121:in `snippet'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/scope.rb:37:in `method_missing'
 | Satellite Kickstart Default:169:in `bind'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode.rb:51:in `eval'
 | /usr/share/foreman/lib/foreman/renderer.rb:56:in `render_safe'
 | /usr/share/foreman/lib/foreman/renderer.rb:175:in `unattended_render'
 | inline template:1:in `_4f6d648bcdf37613afdd5685229c38da'

Comment 4 Marek Hulan 2017-11-20 15:15:09 UTC
Regression caused by BZ 1511158
the puppet.conf line defining aio_enabled got split into two lines, it needs to be single line.

Comment 7 Nikhil Kathole 2017-11-28 09:39:13 UTC
VERIFIED

Version Tested:
Satellite-6.3 Snap 26

2017-11-28 04:24:08 46e91fab [app] [I] Started GET "/unattended/provision?token=958db3e6-bd20-4384-933a-3fb40cf92281" for <IP>
at 2017-11-28 04:24:08 -0500
2017-11-28 04:24:08 46e91fab [app] [I] Processing by UnattendedController#host_template as TEXT
2017-11-28 04:24:08 46e91fab [app] [I]   Parameters: {"token"=>"958db3e6-bd20-4384-933a-3fb40cf92281", "kind"=>"provision"}
2017-11-28 04:24:08 46e91fab [app] [I] Current user: foreman_api_admin (administrator)
2017-11-28 04:24:12 46e91fab [templates] [I] Rendering template 'Kickstart default'
2017-11-28 04:24:12 46e91fab [templates] [I] Rendering template 'Satellite Kickstart Default'
2017-11-28 04:24:12 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:13 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:13 46e91fab [templates] [I] Rendering template 'Kickstart default'
2017-11-28 04:24:13 46e91fab [templates] [I] Rendering template 'kickstart_networking_setup'
2017-11-28 04:24:13 46e91fab [templates] [I] Rendering template 'kickstart_ifcfg_get_identifier_names'
2017-11-28 04:24:13 46e91fab [templates] [I] Rendering template 'kickstart_ifcfg_generic_interface'
2017-11-28 04:24:13 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:13 46e91fab [templates] [I] Rendering template 'subscription_manager_registration'
2017-11-28 04:24:13 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:13 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:13 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.info in a template, it will be removed in 1.17
. Use host_enc instead.
2017-11-28 04:24:14 46e91fab [templates] [I] Rendering template 'remote_execution_ssh_keys'
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:14 46e91fab [templates] [I] Rendering template 'puppet_setup'
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.param_true? in a template, it will be removed
in 1.17. Use host_param_true? instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.param_true? in a template, it will be removed
in 1.17. Use host_param_true? instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:14 46e91fab [templates] [I] Rendering template 'puppet.conf'
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.param_true? in a template, it will be removed
in 1.17. Use host_param_true? instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.param_true? in a template, it will be removed
in 1.17. Use host_param_true? instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.param_true? in a template, it will be removed
in 1.17. Use host_param_true? instead.
2017-11-28 04:24:14 46e91fab [app] [W] DEPRECATION WARNING: you are using deprecated @host.params in a template, it will be removed in 1.
17. Use host_param instead.
2017-11-28 04:24:14 46e91fab [templates] [I] Rendering template 'ansible_provisioning_callback'
2017-11-28 04:24:14 46e91fab [app] [I]   Rendered inline template (1824.2ms)
2017-11-28 04:24:14 46e91fab [app] [I] Completed 200 OK in 6144ms (Views: 1758.8ms | ActiveRecord: 118.0ms)

Comment 8 Bryan Kearney 2018-02-21 17:08:53 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.