Bug 1565487
| Summary: | Bootdisk error: Failed to render boot disk template: undefined method `bootdisk_raise' | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Peter Vreman <peter.vreman> |
| Component: | Bootdisk Plugin | Assignee: | Lukas Zapletal <lzap> |
| Status: | CLOSED ERRATA | QA Contact: | Sachin Ghai <sghai> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.3.0 | CC: | avroy, bkearney, ehelms, inecas, lzap, mhulan, sghai |
| Target Milestone: | 6.4.0 | Keywords: | Regression, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/22482 | ||
| Whiteboard: | |||
| Fixed In Version: | foreman_bootdisk-12.0.0 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-16 19:02:22 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1122832 | ||
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. Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22482 has been resolved. 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.
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 |
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: