Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1565489 - Bootdisk Full Host x Image NilClass error
Summary: Bootdisk Full Host x Image NilClass error
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootdisk Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: 6.4.0
Assignee: Lukas Zapletal
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
Reported: 2018-04-10 06:38 UTC by Peter Vreman
Modified: 2019-11-05 23:15 UTC (History)
4 users (show)

Fixed In Version: foreman_bootdisk-12.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-10-16 18:53:38 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 23267 0 Normal Closed Bootdisk Full Host errors with Nil exception when PXELinux template can't be generated 2020-06-02 09:33:11 UTC

Description Peter Vreman 2018-04-10 06:38:30 UTC
Description of problem:
When clicking on in the UI and testing what Bootdisk Full Image will give me i get an NilClass error. This should never happen, even that not when i maybe forgot to enable or install something.

Below is the error when i click on 'Full Host X Image'. When i click on the Host  Image i got a different error already filed in seperate BZ for that issue.

2018-04-10 06:31:40 65c15b04 [app] [I] Started GET "/bootdisk/disks/full_hosts/li-lc-1008.hag.hilti.com" for at 2018-04-10 06:31:40 +0000
2018-04-10 06:31:40 65c15b04 [app] [I] Processing by ForemanBootdisk::DisksController#full_host as HTML
2018-04-10 06:31:40 65c15b04 [app] [I]   Parameters: {"id"=>"li-lc-1008.hag.hilti.com"}
2018-04-10 06:31:40 65c15b04 [app] [I] Current user: VREMPET-ADMIN (administrator)
2018-04-10 06:31:40 65c15b04 [app] [I] Expire fragment views/tabs_and_title_records-6 (0.1ms)
2018-04-10 06:31:40 65c15b04 [app] [W] Action failed
 | NoMethodError: undefined method `gsub!' for nil:NilClass
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk- `block (2 levels) in generate_full_host'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk- `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk- `map'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk- `block in generate_full_host'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk- `map!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk- `generate_full_host'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk- `full_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
2. Click Bootdisk 'Full Host x Image'

Actual results:
NilClass error

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

Additional info:

Comment 7 pm-sat@redhat.com 2018-05-29 12:22:26 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23267 has been resolved.

Comment 9 Sachin Ghai 2018-09-12 06:35:49 UTC
Verified with Sat6.4.0 snap21

I can download Full host image without any error from UI. Here are the logs from production.log:

2018-09-12T00:40:40 [I|app|] Started GET "/bootdisk/disks/full_hosts/hoststaticbootdisk.xxx.redhat.com" for 10.xx.xx.xx. at 2018-09-12 00:40:40 -0400
2018-09-12T00:40:40 [I|app|2d02c] Processing by ForemanBootdisk::DisksController#full_host as HTML
2018-09-12T00:40:40 [I|app|2d02c]   Parameters: {"id"=>"hoststaticbootdisk.xxx.redhat.com"}
2018-09-12T00:40:40 [I|app|2d02c] Current user: admin (administrator)
2018-09-12T00:40:40 [I|tem|2d02c] Rendering template 'Kickstart default PXELinux'
2018-09-12T00:40:40 [I|blo|2d02c] Unattended render of 'Kickstart default PXELinux' = 'ef17b9711ee379a90d5e037da3cafa50ed900df16e2b209d2cd6f7852381b6fd'
# This file was deployed via 'Kickstart default PXELinux' template

DEFAULT Kickstart default PXELinux

LABEL Kickstart default PXELinux
  KERNEL boot/RedHat-7.5-x86_64-vmlinuz
  APPEND initrd=boot/RedHat-7.5-x86_64-initrd.img ks=http://cloud-xxx.redhat.com/unattended/provision?token=58858dd3-c04e-495f-ba89-569073beb7c5  network ksdevice=bootif ks.device=bootif BOOTIF=00-52-54-00-21-c9-44 kssendmac ks.sendmac inst.ks.sendmac ip=192.168.xx.xx:192.168.xx.xx: nameserver=192.168.xx.xx

I was able to provision a host with generated FULL host image.

Comment 10 Bryan Kearney 2018-10-16 18:53:38 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.


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