When I want to us the provided “Kickstart default PXELINUX” template, I get an error rendering the template, making it unusable.
Failed to enable vmlabcentos801.staging.rsvgnw.local for installation: [“Unable to render PXELinux template ‘Kickstart default PXELinux’: undefined method `nic_delay’ for #Subnet::Ipv4:0x00007f94d5519ed0”]
Expected outcome: : render PXELinux template successfully
Foreman and Proxy versions: 1.22
Foreman and Proxy plugin versions: puppetdb_foreman 5.0.0, foreman_templates 6.0.3, foreman_setup 6.0.0
Distribution and version: CentOS 7.7
Other relevant data:
2019-12-11T15:17:24 [W|app|0afc319d] There was an error rendering the Kickstart default PXELinux template:
| NoMethodError: undefined method `nic_delay' for #<Subnet::Ipv4:0x000000000b1b8090>
| /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activemodel-5.2.1/lib/active_model/attribute_methods.rb:430:in `method_missing'
| Kickstart default PXELinux:54:in `get_binding'
| /opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:876:in `eval'
| /opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:876:in `result'
| /usr/share/foreman/lib/foreman/renderer/unsafe_mode_renderer.rb:7:in `render'
| /usr/share/foreman/lib/foreman/renderer/base_renderer.rb:16:in `render'
| /usr/share/foreman/lib/foreman/renderer.rb:45:in `render'
Hello and welcome!
It looks like you are using the templates from 1.24 with 1.22. Perhaps you synced the wrong branch of community templates?
The nic_delay parameter was only added in Foreman 1.24 in Feature #22742: Add nicdelay/linksleep options per subnet/location - Foreman
Thank you for the help
Yes, I had the bad idea to update the templates, and they are for 1.24.
As Foreman 1.24 binaries are not ready yet for CentOS, I will go revert my templates.
In fact Foreman 1.24 was just released a few hours ago, so you can start planing your upgrade just be sure to make a backup and go one version at a time (i.e. 1.22->1.23->1.24).
I have just installed fresh Foreman 1.24 on Centos7 and i got issue with provisioning tempates.
awaria parsowania Kickstart default PXELinux: undefined method ‘#dhcp_boot_mode?’ for NilClass::Jail (NilClass).
awaria parsowania Kickstart default PXEGrub: undefined method ‘#dhcp_boot_mode?’ for NilClass::Jail (NilClass).
awaria parsowania Kickstart default PXEGrub2: undefined method ‘#dhcp_boot_mode?’ for NilClass::Jail (NilClass).
awaria parsowania Kickstart default iPXE: undefined method ‘#nic_delay’ for NilClass::Jail (NilClass).
On Foreman 1.24 with templates from 1.24 there should be no issues like this right?
Correct, it looks like there is no Subnet associated with the host? Or possible the subnet is not in the same organization or location as the host?
Hi, it wasn’t my first foreman deployment and as far as i remember i did everything right. Was was curious is that even after i manualy removed invalid code from templates i Foreman did not create grub files in tftpboot directory. I’m now installing 1.23 and if it work i’ll try rollback vm to 1.24 installation and check again, and eventualy upgrade from 1.23 to 1.24
I’ve managed to make it work on 1.24. Thanks.