RFC: Preregistered discovery workflow

Hi, I see very often that users would love to use iPXE but there are issues with either hardware drivers or EFI. One of the most important reasons why people pick iPXE is that it avoids TFTP protocol because the stack fully supports HTTP.

We already have a workflow that avoids TFTP and that is discovery PXE-less mode. In this workflow, discovery ISO is mounted locally (CDROM, USB stick) and registers node, then it can be provisioned via PXE workflow (reboot) or without PXE (kexec).

Discovery is the preferred way because it’s based on RHEL/CentOS therefore there is great hardware compatibility including certified hardware. Red Hat customers also can contact official support if there are issues with drivers, firmware or hardware.

In order to help users to adopt discovery, I suggest to create new workflow:

  1. A host is registered in Foreman inventory. It is assigned to a subnet that does not necessarily have DHCP or/and PXE features on.
  2. A host is turned on and booted locally into discovery image with special flag on kernel command line “fdi.preregistered” (discovery-remaster script can be used to change the configuration line). The same can be selected from TUI.
  3. Host is not discovered, but instead discovery makes a call to /unattended/kexec?mac=52:54:00:84:1f:89 and if there is kexec template associated and MAC address of the provisioning interface matches, it is returned (the mac option was provided by bootdisk but now has been merged into core so no bootdisk plugin needs to be installed for this)
  4. Discovery downloads kernel/initramdisk and performs kexec into the installer.

This will work on all hardware supported by RHEL/CentOS and any supported OS can be installed (Fedora, Debian, Ubuntu). It’s easy to understand workflow, it will work both on BIOS and EFI and in the future also on UEFI HTTP boot. This could mean that EFI systems being able to HTTP boot discovery could avoid PXE completely and start provisioning pre-registered hosts.

What you think?

I think this would be a useful feature. Do you need to have an fdi,preregistered option? Would it be possible to just have discovery build the host if the corresponding record in Foreman was in build mode?

That’s possible, yeah.