Problem:
Following the ideal guidelines, I assigned different IP ranges (but still from the same subnet) to ISC DHCP server as well as on the Foreman UI. When a host was discovered, it was first assigned an IP address within the range given to the DHCP server, and after clicking on the Foreman UI to start the provisioning of the host, the host was assigned another IP address within the range written on the Foreman UI.
However, the host was not able to download the image of the OS.
Expected outcome:
The discovered host can be provisioned successfully. Foreman and Proxy versions:
2.14
I was reading through the Foreman guide and came across something called the Build Token. It seems like there wasnāt any Build Token assigned. I will look through the logs and try to give you more info
So we are trying to provision a server, which is using UEFI to boot.
The Foreman Server is also the DHCP Smart Proxy server, the DHCP Server and the TFTP server.
We are using Grub2 UEFI as the PXE loader, and Kickstart Default as the Partition Table.
I will walk you through the provisioning process and what I observed:
Hosts gets rebooted, asks for an IP and is assigned one.
Shows a menu from /var/lib/tftpboot/grub2/grub.cfg on the Foreman Server. We chose that one for Foreman Discovery.
Foreman discovers the host. We then click for the host to be provisioned on the Foreman UI.
A reservation is made for the host in DHCP lease file, with filename=grub2/grubx64.efi, server= the Foreman server, and the host did indeed take up the reservation.
The file grub.cfg-mac_address was created at /var/lib/tftpboot/grub2.
Despite the above steps, the host was still not provisioned. I am unsure whether the OS installer was loaded or not, but then I did not see the Kickstart Menu from the grub.cfg-mac_address file.
Ok, we are getting somewhere. Now, I assume your host boots again into discovery, is that correct?
In that case show me the grub.cfg file from the TFTP directory.
And also after you boot that host, show me system log which should contain both DHCP and TFTP log information. You should see the grub making attempts to load the MAC-based named grub configuration file.
The host did not boot again into Discovery because it was already discovered.
The host simply tries to boot over PXE Network again, then this time it said failed to boot, and went on to boot using other methods.
For the grub.cfg file it contained this segment of code:
if [ $grub_platform} == āpcā ]; then
menuentry āForeman Discovery Imageāāid discovery {
linux boot/fdi-image/vmlinuz0 ${common}
initrd boot/fdi-image/initrd0.img
}
else
menuentry āForeman Discovery Image EFIāāid discovery {
linuxefi boot/fdi-image/vmlinuz0 ${common}
initrdefi boot/fdi-image/initrd0.img
}
fi
Since I am using baremetal server, the second menuentry was displayed instead.
As for the system logs, I am not allowed to show it, but I did not see any logs from TFTP at all.
Provisioned host in Foreman does boot from network, this is by design, but host that is in Foreman inventory has its own MAC-based confiiguration which chainboots from HDD.
I think we need to update our docs with more info about this, I take this for granted but its not obvious. @mcorr gonna make a patch: