Bug 1324469
Summary: | Unable to provision host without PXELinux template | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Roman Plevka <rplevka> | ||||
Component: | Orchestration | Assignee: | Lukas Zapletal <lzap> | ||||
Status: | CLOSED ERRATA | QA Contact: | Roman Plevka <rplevka> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.2.0 | CC: | bbuckingham, bkearney, ehelms, lzap, ohadlevy | ||||
Target Milestone: | Unspecified | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | http://projects.theforeman.org/issues/14521 | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-07-27 11:10:25 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: | |||||||
Attachments: |
|
Description
Roman Plevka
2016-04-06 12:05:37 UTC
TRIAGE NOTES: I don't think this is high-priority or blocker, easy workaround of associating any PXELinux template. Reproduced, we need to prevent from running TFTP orchestration. 2016-04-07 05:07:28 [app] [W] Failed to generate PXELinux template: undefined method `encoding' for nil:NilClass | NoMethodError: undefined method `encoding' for nil:NilClass | /opt/rh/rh-ruby22/root/usr/share/ruby/erb.rb:598:in `compile' | /opt/rh/rh-ruby22/root/usr/share/ruby/erb.rb:800:in `initialize' | /usr/share/foreman/lib/foreman/renderer.rb:16:in `new' | /usr/share/foreman/lib/foreman/renderer.rb:16:in `render_safe' | /usr/share/foreman/lib/foreman/renderer.rb:103:in `unattended_render' | /usr/share/foreman/app/models/concerns/orchestration/tftp.rb:45:in `generate_pxe_template' | /usr/share/foreman/app/models/concerns/orchestration/tftp.rb:63:in `setTFTP' | /usr/share/foreman/app/models/concerns/orchestration.rb:162:in `execute' | /usr/share/foreman/app/models/concerns/orchestration.rb:107:in `block in process' | /usr/share/foreman/app/models/concerns/orchestration.rb:99:in `each' | /usr/share/foreman/app/models/concerns/orchestration.rb:99:in `process' | /usr/share/foreman/app/models/concerns/orchestration.rb:35:in `on_save' Upstream bug assigned to lzap Upstream bug component is Orchestration For the record, this bug is only relevant in scenario when your OS *has* iPXE template associated but *has not* PXELinux template assicociate. If there is no iPXE, then we raise a proper error: "No %{template_kind} templates were found for this host, make sure you define at least one in your %{os} settings". Before you verify, read the resolution in the upstream ticket. We are likely only to change the message to something better. Moving to POST since upstream bug http://projects.theforeman.org/issues/14521 has been closed ------------- Lukas Zapletal Applied in changeset commit:c7bb92a96c0ce8f8a9f6a3c4f2ce0bf95a73f459. I get your point, but we don't know that the host was created on libvirt. This part of Foreman must work in general, so I made a patch that gets rid of the ugly error "undefined method `encoding' for nil:NilClass" replacing it with a proper one. You need to associate at least PXELinux template. For 6.3+ we will redesign PXE templates for UEFI support, I will consider an option to be able to avoid this behavior: https://github.com/theforeman/rfcs/pull/2#issuecomment-219390164 (In reply to Lukas Zapletal from comment #10) > I get your point, but we don't know that the host was created on libvirt. > This part of Foreman must work in general, so I made a patch that gets rid > of the ugly error "undefined method `encoding' for nil:NilClass" replacing > it with a proper one. You need to associate at least PXELinux template. > > For 6.3+ we will redesign PXE templates for UEFI support, I will consider an > option to be able to avoid this behavior: > https://github.com/theforeman/rfcs/pull/2#issuecomment-219390164 FAILEDQA: This fix actually adds not message leaving the 'ugly' one still in place instead of replacing it. Could you tweak it more, please? [screenshot attached] Created attachment 1159981 [details]
both error messages displayed
I don't see the upstream patch to be present: https://github.com/theforeman/foreman/pull/3402/files I think the error message (see comment 12 screenshot) is clear enough. Compare to previous state which was only "Failed to generate PXELinux template: undefined method `encoding' for nil:NilClass". Now you see what's wrong and how to fix it. Since we are redesigning TFTP orchestration for UEFI right now, I think this is not worth any other effort for 6.2. Required templates will be driven from TFTP flag that will be associated with host now (new feature). Let's just waive it for 6.2. Workaround is obvious - either associate PXELinux template with our OS or don't associate TFTP Capsule for the whole subnet so TFTP orchestration is skipped. Moving to verified since showing both messages is apparently by design. 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 |