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 1565487 - Bootdisk error: Failed to render boot disk template: undefined method `bootdisk_raise'
Summary: Bootdisk error: Failed to render boot disk template: undefined method `bootdi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootdisk Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.4.0
Assignee: Lukas Zapletal
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2018-04-10 06:34 UTC by Peter Vreman
Modified: 2019-11-05 23:15 UTC (History)
7 users (show)

Fixed In Version: foreman_bootdisk-12.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:02:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22482 0 None None None 2018-04-17 12:00:53 UTC

Description Peter Vreman 2018-04-10 06:34:53 UTC
Description of problem:

When clicking on in the UI and testing what Bootdisk will give me i get an 'NoMethodError'. This should never happen, even that not when i maybe forgot to enable or install something.

Below is the error when i click on 'Host X Image'. When i click on the Full Image i get a different error and will raise a seperate BZ for that issue.

-------------
2018-04-10 06:28:28 f7c5a26b [app] [I] Started GET "/bootdisk/disks/hosts/li-lc-1008.hag.hilti.com" for 10.2.2.21 at 2018-04-10 06:28:28 +0000
2018-04-10 06:28:28 f7c5a26b [app] [I] Processing by ForemanBootdisk::DisksController#host as HTML
2018-04-10 06:28:28 f7c5a26b [app] [I]   Parameters: {"id"=>"li-lc-1008.hag.hilti.com"}
2018-04-10 06:28:28 f7c5a26b [app] [I] Current user: VREMPET-ADMIN (administrator)
2018-04-10 06:28:28 f7c5a26b [app] [I] Expire fragment views/tabs_and_title_records-6 (0.1ms)
2018-04-10 06:28:28 f7c5a26b [templates] [I] Rendering template 'Unnamed'
2018-04-10 06:28:28 f7c5a26b [app] [W] Failed to render boot disk template
 | NoMethodError: undefined method `bootdisk_raise' for #<Host::Managed:0x007fdc46922500>
 | Did you mean?  bootdisk_isofile
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activemodel-4.2.6/lib/active_model/attribute_methods.rb:433:in `method_missing'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.2/lib/safemode/scope.rb:37:in `method_missing'
 | Unnamed:58: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'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-10.0.2.2/app/models/concerns/foreman_bootdisk/host_ext.rb:16:in `bootdisk_template_rend
er'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-10.0.2.2/app/controllers/foreman_bootdisk/disks_controller.rb:24:in `host'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/actionpack-4.2.6/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/actionpack-4.2.6/lib/abstract_controller/base.rb:198:in `process_action'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/actionpack-4.2.6/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/actionpack-4.2.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:117:in `call'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:505:in `call'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
-------------

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


How reproducible:


Steps to Reproduce:
1. Enable Build on Host
2. Click Bootdisk 'Host X Image'
3.

Actual results:
NoMethodError

Expected results:
Either successful bootdisk or an User friendly error what is missing


Additional info:

Comment 3 Lukas Zapletal 2018-04-17 11:37:36 UTC
Thank you, this is regression. The patch is pending merge upstream, but due to Rails 5.2 upgrade jenkins is red we need to fix it first.

Comment 5 Satellite Program 2018-05-23 08:13:06 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22482 has been resolved.

Comment 13 Sachin Ghai 2018-09-11 12:03:42 UTC
Verified with Sat6.4 snap21.

I can download the "Host x Image" from UI -> host details ->  bootdisk dropdown.

I didn't see any error in logs:

2018-09-11T02:40:54 [I|app|] Started GET "/bootdisk/disks/hosts/hostrhel7.xxx.redhat.com" for 10.76.33.227 at 2018-09-11 02:40:54 -0400
2018-09-11T02:40:54 [I|app|d6a06] Processing by ForemanBootdisk::DisksController#host as HTML
2018-09-11T02:40:54 [I|app|d6a06]   Parameters: {"id"=>"hostrhel7.idmqe.lab.eng.bos.redhat.com"}
2018-09-11T02:40:54 [I|app|d6a06] Current user: admin (administrator)
2018-09-11T02:40:54 [I|tem|d6a06] Rendering template 'Unnamed'
2018-09-11T02:40:54 [I|blo|d6a06] Unattended render of 'Unnamed' = '571e936ca675412bb6f4ca2f5aa52ea7e2c34d40bf3d016b602c25f18ccaa00f'
#!ipxe
# Example foreman_bootdisk host template
# This template is rendered for use inside a host-specific boot disk.
#
# Copy this template to customize it, the original is read-only.



echo Foreman Bootdisk: Host image (hostrhel7.xxx.redhat.com)

# loop over net* until the host's MAC matches
:net0
isset ${net0/mac} || goto no_nic
echo net0 is a ${net0/chip} with MAC ${net0/mac}
iseq ${net0/mac} 52:54:00:21:c9:44 || goto net1
set idx:int32 0
goto loop_success
:::::


::::

Template rendered correctly in logs.

Later, I provisioned a host with "host x image" and with static networking. Host was provisioned successfully.

Comment 14 Bryan Kearney 2018-10-16 19:02:22 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:2927


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