Bug 1344689 - [upgrade] Host provisioning failed due to: an error rendering the Satellite Kickstart Default template
Summary: [upgrade] Host provisioning failed due to: an error rendering the Satellite K...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks: 1335807
TreeView+ depends on / blocked
 
Reported: 2016-06-10 11:24 UTC by Sachin Ghai
Modified: 2019-09-26 17:32 UTC (History)
2 users (show)

Fixed In Version: foreman-1.11.0.39-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:41:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
complete exception (49.56 KB, text/plain)
2016-06-10 12:19 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15416 0 None None None 2016-06-14 18:31:08 UTC

Description Sachin Ghai 2016-06-10 11:24:41 UTC
Description of problem:
I was trying host provisioning and it failed at the step where anaconda fetches the kickstart file to install

2016-06-10 07:06:07 [app] [I] Started GET "/unattended/provision?token=fffc010f-6066-4858-a7be-22c0a78e18d4" for 10.8.119.2 at 2016-06-10 07:06:07 -0400
2016-06-10 07:06:07 [app] [I] Processing by UnattendedController#host_template as */*
2016-06-10 07:06:07 [app] [I]   Parameters: {"token"=>"fffc010f-6066-4858-a7be-22c0a78e18d4", "kind"=>"provision"}
2016-06-10 07:06:07 [app] [I] Found testhost5.satqe.lab.eng.rdu2.redhat.com
2016-06-10 07:06:10 [app] [I]   Rendered inline template (192.5ms)
2016-06-10 07:06:10 [app] [W] There was an error rendering the Satellite Kickstart Default template: 
 | ActionView::Template::Error: The snippet 'kickstart_networking_setup' threw an error: undefined method 'has_primary_interface?' for Host::Managed::Jail (Host::Managed)
 | /usr/share/foreman/lib/foreman/renderer.rb:87:in `rescue in snippet'
 | /usr/share/foreman/lib/foreman/renderer.rb:84:in `snippet'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.3/lib/safemode/scope.rb:37:in `method_missing'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.3/lib/safemode.rb:141:in `bind'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.3/lib/safemode.rb:51:in `eval'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.3/lib/safemode.rb:51:in `eval'
 | /usr/share/foreman/lib/foreman/renderer.rb:19:in `render_safe'
 | /usr/share/foreman/lib/foreman/renderer.rb:113:in `unattended_render'
 | inline template:1:in `_ff473c662c18b41d954417657abc7d94'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/template.rb:145:in `block in render'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications.rb:161:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/template.rb:339:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/template.rb:143:in `render'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/deface-1.0.2/lib/deface/action_view_extensions.rb:41:in `render'
 |

Version-Release number of selected component (if applicable):
upgrade sat6.1.9 -> sat6.2 Ga snap15.1 on rhel7

How reproducible:


Steps to Reproduce:
1. upgrade satellite 6.1.9 -> 6.2
2. re-run the installer to enable dns, dhcp features
3. create new host

Actual results:
host provisioning failed

Expected results:
provisioning should work

Additional info:

Comment 1 Sachin Ghai 2016-06-10 12:19:47 UTC
Created attachment 1166625 [details]
complete exception

Comment 3 Stephen Benjamin 2016-06-10 12:37:27 UTC
Looks like it was overlooked in the host jail, it's not allowed here: https://github.com/theforeman/foreman/blob/develop/app/models/host/managed.rb#L70

Comment 4 Stephen Benjamin 2016-06-10 12:48:51 UTC
Sorry, it's not that it needs adding to the jail, the snippet needs to get updated.

Foreman never reseeds templates after the initial installation, so you're running the 6.1 version of all the templates on 6.2. It needs to get fixed.

Ideally, Foreman would lock the templates it ships and always update them on an upgrade.  That may take some time to get upstream, so in the interim we might need a migration in foreman_theme_satellite or something.

Comment 5 Stephen Benjamin 2016-06-14 18:31:07 UTC
Created redmine issue http://projects.theforeman.org/issues/15416 from this bug

Comment 6 Bryan Kearney 2016-06-14 20:17:05 UTC
Upstream bug component is Provisioning

Comment 7 Bryan Kearney 2016-06-15 06:16:43 UTC
Upstream bug component is Provisioning Templates

Comment 8 Bryan Kearney 2016-06-15 08:16:31 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15416 has been closed

Comment 9 Sachin Ghai 2016-06-28 09:05:16 UTC
Verification of this bz dependent on fix of https://bugzilla.redhat.com/show_bug.cgi?id=1349492

Comment 10 Sachin Ghai 2016-07-07 08:13:55 UTC
Verification of bz1349492 is done with sat62 GA snap19 and provisioning is working fine for rhel6 and rhel7 hosts without any issue. So moving this to verified too.

Comment 11 Bryan Kearney 2016-07-27 11:41:44 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/RHBA-2016:1501


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