Bug 1123049 - Null pointer when creating/building host with extermal capsule
Summary: Null pointer when creating/building host with extermal capsule
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Dmitri Dolguikh
QA Contact: Og Maciel
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2014-07-24 17:35 UTC by Shannon Hughes
Modified: 2019-04-01 20:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-04 19:04:53 UTC


Attachments (Terms of Use)
debug log (77.23 KB, text/x-log)
2014-07-24 17:35 UTC, Shannon Hughes
no flags Details
stack trace for tftp (74.26 KB, text/plain)
2014-07-28 13:25 UTC, Shannon Hughes
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1307593 None None None Never

Description Shannon Hughes 2014-07-24 17:35:58 UTC
Created attachment 920650 [details]
debug log

Description of problem:

setup a external capsule and included the subnet 192.168.200.1/24 in the host build. when creating the host the following prevents from saving: 

Failed to generate PXELinux template: undefined method `each' for nil:NilClass

This seemed to pop up when adding subnet to the host group. I am including production.log with debug turned on

Comment 1 RHEL Product and Program Management 2014-07-24 17:43:52 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Shannon Hughes 2014-07-25 11:00:36 UTC
additional info...the nilClass issue only happens when I attach a subnet to the Host Group or select manually for each host build.

Comment 4 Lukas Zapletal 2014-07-28 09:07:45 UTC
Hey Shannon,

we do not propagate the exception properly, can you please edit this file:

/usr/share/foreman/app/models/concerns/orchestration/tftp.rb

and on the line 82

81  rescue => e
82    failure _("Failed to...") % { :template_kind => os.template_kind, :e => e }
83  end

add extra parameter e as the second one:

82    failure _("Failed to...") % { :template_kind => os.template_kind, :e => e }, e

Then reproduce and paste the exception backtrace.


Note for assignee: we should fix all "failure" calls when exception is not passed in as a second paramter with this bug.

Comment 5 Shannon Hughes 2014-07-28 13:25:30 UTC
attaching stack as stack.trace

Comment 6 Shannon Hughes 2014-07-28 13:25:55 UTC
Created attachment 921761 [details]
stack trace for tftp

Comment 7 Lukas Zapletal 2014-07-29 09:22:14 UTC
Sorry, the line should be:

82    failure _("Failed to...") % { :template_kind => os.template_kind, :e => e }, e.backtrace

(note the "backtrace" method call).

This stracktrace is useless :-(

Comment 8 Dominic Cleal 2014-08-11 17:11:55 UTC
It's likely the wrong PXELinux template is associated to the operating system.  Ensure you have "Kickstart default PXELinux" associated, *not* "PXELinux global default" or similar.

Comment 10 Lukas Zapletal 2014-08-26 07:17:01 UTC
Created upstream ticket - let's improve error handling for 6.1+.

http://projects.theforeman.org/issues/7258

Comment 11 Dmitri Dolguikh 2015-06-10 15:23:20 UTC
Can't reproduce the original issue in this ticket. Error handling/logging has a dedicated BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1194352

Comment 12 Bryan Kearney 2015-06-10 16:01:55 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7258 has been closed

Comment 16 Og Maciel 2016-04-04 18:21:56 UTC
I have been able to provision a new host (libvirt installed in the Satellite itself) using an external capsule (complete different system) without any issues. I used the network/subnet associated with my libvirt setup and everything worked fine.

Comment 17 Og Maciel 2016-04-04 19:04:53 UTC
Spoke to @shugues and @Toledo about this issue and we all feel that it is safe to close it as WORKSFORME.


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