Use MAC address if IP doesn't exist when tftp booting.
When a host is being built we use a DHCP range so the IP address recorded in foreman is wrong during the TFTP boot. It should check for MAC address and boot from that instead if possible!
#1 Updated by Ashley Penney almost 9 years ago
OK, I've now moved to foreman as my external node classifer and it's raised several problems for me and I'm going to attempt to explain my work flow and requirements because I feel other people may have similar workflows.
I have a small DHCP build range in the same subnet as my foreman/puppet server. I add a new host into foreman and type in the eventual IP of the server. I then PXE boot that server and it picks up an IP from the DHCP range and fails. I catch that IP and change the entry for the host in foreman to make them match and restart the build. It then builds and when it's done I change the IP to the final IP in foreman and let puppet run.
- Foreman needs me to set the DHCP build range IP in the host which is a pain.
- Foreman can't figure out the right PXE boot stuff from the MAC alone.
- When puppet runs it reports the current ip of the server to foreman, which then updates the IP field.
- I rely on the IP field (thanks to a hack in host.rb) to set the node's networking details.
For this to work for me I ideally need foreman to work from a MAC address during the initial install and for it to only update the foreman database with the IP of the server if that field is currently blank. Ideally, this would be a toggle option somewhere.
#7 Updated by Ohad Levy over 8 years ago
- File 0001-Fixes-284-Use-MAC-address-if-IP-doesn-t-exist-when-t.patch 0001-Fixes-284-Use-MAC-address-if-IP-doesn-t-exist-when-t.patch added
updated patch to actually send the ip/mac as host parameters