Multiple tftpboot/pxelinux.cfg files when changing the provisioning interface
When you do the following you are left with multiple mac address files in /var/lib/tftpboot/pxelinux.cfg/ for a single host:
1. Create a new host with interface en0 being the provisioning interface
2. Edit the host and change interface en1 to the provisioning interface
3. Hit the Build button on the host
(you now have two mac address files - one for en0, one for en1)
4. Destroy the host
(the mac address file for en1 is deleted, but the old en0 remains)
A similar scenario ensues if you simply update the mac address on any interface.
Not sure what a good solution here should be but a few options come to mind.
1. Loop through all interfaces on save and delete files related to non-provisioning interfaces.
2. Delete files matching the old mac address on save
#1 Updated by Lukas Zapletal about 5 years ago
Thanks for report, this is indeed a problem. The provisioning interface change is bummer, but the MAC address change should really clean the file. Can you provide foreman-proxy logs from the MAC address change? I believe this should work fine, I tested this many times in the past.