Fixes #37615 - Improve help text for the PXE loader in the Host form
I observe a couple of problems with this field:
-
Auto-suggested- doesn't mean that it's suitable. Is it suggested based on the OS? But the OS cannot tell Foreman whether the future host is legacy BIOS or UEFI or anything else about the config of the host. So what's the point of suggesting it? -
use OS parameter 'pxe-loader' to override- I guess that the point isn't to override, but to define it on the OS level, so wording is the issue. But I don't think it's useful to propose it to the user with incomplete information: what are the allowed values of thepxe-loaderparameter? And is it even a good idea to define it on the OS level? And if it is, should we provide an optional field in the OS form instead of the parameter? -
non-PXE booting- does the user have to set this for bootdisk or not? What about image-based provisioning? What about HTTP chainbooting? Also, I'm not sure under what conditions iPXE counts as non-PXE, that's confusing me.
IMO, this is the part where the user actually tells Foreman what network boot capabilities the host has and how Foreman should attempt to boot it. I think that should be the central information in this context help.
How about something like the following:
Configure DHCP filename to boot the host with the given firmware (BIOS/UEFI) over the network. Set to None for non-PXE booting (eg. iPXE, bootdisk). This option specifies the bootloader file that is sent to the host via TFTP during PXE boot and DHCP options for the PXE boot.
For reference: https://docs.theforeman.org/nightly/Provisioning_Hosts/index-katello.html#DHCP_Options_provisioning
I may need to think about this a bit more too. The above suggestion isn't final.
This shows up in the Host form for, but also in the Host Group form. It looks like this:
My reading of the Foreman code is that this happens:
- The backend code automatically suggests a PXE loader based on the OS configuration (via preferred_loader)
- The frontend selects this value by default for new hosts/host groups
- The suggestion can be modified by adding a parameter
pxe-loaderon the OS (see PxeLoaderSuggestion - When saved, it determines:
- For DHCP (if any) if the nextServer attribute is set to the boot server if any PXE loader (except None) is chosen. It also determines the boot_file
- For TFTP (if any) it validates at least the template kind is present but all template kinds are always written out
- For VMware, when firmware type is set to
automatic(default) this value influences the firmware (via firmware_type)