Bug #33937
closed
Cannot change "local boot ipxe template"
Added by Ben Magistro about 3 years ago.
Updated over 2 years ago.
Description
First, I know we need to upgrade but looking at the code on github it looks like this might exist in current versions too if we are interpreting things correctly.
Under settings -> provisioning, we have updated "local boot ipxe template" to be a custom template we created however, it appears hosts are still trying to use the "ipxe default local boot" template. As best as we could trace it the model will generate a template name of "ipxe default local boot" (https://github.com/theforeman/foreman/blob/1.22.0/app/models/provisioning_template.rb#L137). The unattended controller would then return either a host specific (don't believe we are using this/is even exposed in the ui?) or a default template (https://github.com/theforeman/foreman/blob/develop/app/controllers/unattended_controller.rb#L115) ignoring the value in settings -> provisioning. This behavior was observed both with a real host boot and with access to `unattended/iPXE?spoof=`.
Is there a setting we missed updating or cache clearing step?
Hey Ben,
"local boot ipxe template" is only used when foreman does not have host in the inventory. On the other hand, "ipxe default local boot" will be used for hosts in the inventory. This works the same for all template kinds.
What are you trying to achieve that cannot be done this way?
Hello,
We are trying to have a utilities menu be available for hosts in inventory but not in build. So say we reboot, the default in the menu option might still be a local boot, but if an operator was at the console they could arrow down to something else. In our case we have a firmware update image and gparted that we would like to be available here.
For the templates, I want to confirm I understand when each is used. There are a handful of others that are "kickstart" (or other installer) but don't think those come into play in the sequence we are discussing.
iPXE default local boot -- used for hosts in inventory (and not set to build?)
iPXE global default -- used for unknown hosts
iPXE intermediate script -- used to resolve IP to MAC when dhcp isn't managed
We have overridden the `iPXE default local boot` and `iPXE global default` to include the additional menu items. We have also updated the settings in provisioning for "Global default iPXE template" and "Local boot iPXE template". The global default template is working.
Thanks,
Ben
I can confirm your understanding, yeah.
So is this resolved or not?
Then this is unfortunately not resolved as we seem to continue to use the provided "iPXE default local boot" even though we have changed in settings what we want to be used for the "local boot iPXE template". Going back to the source files I initially referenced, unlike the global default which does seem to reference a configurable option from settings, I do not see an equivalent for the local boot. This leads me to believe that while we can override the file in settings it won't actually be used.
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8992 added
- Fixed in Releases 3.3.0 added
- Status changed from Ready For Testing to Closed
- Category set to Templates
Also available in: Atom
PDF