Bug #745
closed
PXELinux <%= @host.name %>
Added by Arnaud Sourioux over 13 years ago.
Updated over 12 years ago.
Category:
Unattended installations
|
Description
When I use the <%= @host.name %> var in my PXELinux file
the template is correctly generated if I acces it from : /unattended/template/$template_name/$hostgroup
but when I click on build I got this error :
"undefined method 'name' for nil:NilClass on generate PXELinux template"
- Status changed from New to Feedback
that makes sense because you are rendering a non host specific template...
I'm not sure which hostname should it provide?
when i acces this way /unattended/template/$template_name/$hostgroup the <%= @host.name > is the hostgroup name
wich is logic beacuse it cannot be a particular host name
but it shouldn't give an error if the render was good
when i click on build (for a paricular host), the <= @host.name %> value should be the name of the host i'm trying to build
the point is not if the host name can be used but it shouldn't give an error
- Status changed from Feedback to Need more information
- Assignee deleted (
Ohad Levy)
maybe I'm missing something here, but if you are using hostgroup deployments, then there is no build option for that?!
I just hit a very similar, if not the same, issue with a PXElinux template.
It appears that the Intel S5520HC boards that I have don't work with the anaconda argument:
ksdevice=bootif
and I get prompted to select the interface to use for installation. Manually editing the pxe cfg file to have the argument ksdevice=<mac> seems to work and anaconda no longer prompts for interface selection. As a work around, it would be desirable to use @host.mac in PXElinux templates. However, this seems not to work, with or without safe render set. Eg
ksdevice=<% @host.mac %>
causes this error:
Failed to generate PXELinux template: undefined method 'mac' for Safemode::Jail (NilClass)
Confirmed here with Foreman 4.2, though this should have been fixed with Bug #653.
Peter Bauer wrote:
Confirmed here with Foreman 4.2, though this should have been fixed with Bug #653.
If you just use <%= mac %> does it work? my feeling this was already solved via #1385
Ohad Levy wrote:
Peter Bauer wrote:
Confirmed here with Foreman 4.2, though this should have been fixed with Bug #653.
If you just use <%= mac %> does it work? my feeling this was already solved via #1385
Hi,
like stated by Florian Koch, the following works for me, but only if safemode rendering is disabled.
ksdevice=<%=mac %>
With safemode rendering enabled, i get the following error:
Failed to generate PXELinux template: undefined method 'mac' for Safemode::Jail (NilClass)
- Status changed from Need more information to Duplicate
Also available in: Atom
PDF