I’m using Foreman 1.23.1 with two DHCP proxies set as a failover. I can’t reprovision the same host due to error with IP conflict. This error shows up even when an entry in dhcpd.leases doesn’t exist. To avoid this error I have to remove DHCP entry from dhcpd.leases and then restart dhcpd.service
Create DHCP Settings for am2-testapi008.dc.egnyte.lan task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy https://am2-foreman-proxy-dhcp01.domain:8443/dhcp
More details, more logs, IP and lease addresses (are they the same?). If you change PXE loader this can lead to such conflict, this has been fixed recently.
This error message is not a bug, not a root cause. Something (manual intervention, a different bug) made the DHCP records out of sync with Foreman database.
There is a new rake task to show the differences and fix these:
Orchestration maintainance tasks.
WARNING: Always backup server data (e.g. DHCP leases file, DNS journal files)
prior running these tasks. They do nothing by default, unless perform=1 is
specified.
Examples:
foreman-rake orchestration:dhcp:add_missing subnet_name=NAME
Preview missing DHCP records on a DHCP Smart Proxy.
foreman-rake orchestration:dhcp:add_missing subnet_name=NAME perform=1
Do create missing DHCP records on a DHCP Smart Proxy.
foreman-rake orchestration:dhcp:remove_offending subnet_name=NAME
Preview offending DHCP records on a DHCP Smart Proxy.
foreman-rake orchestration:dhcp:remove_offending subnet_name=NAME perform=1
Do remove offending DHCP records on a DHCP Smart Proxy.