Bug #17613
openDiscovery, DHCP and lease conflict
Description
Hello,
I am testing the Discovery plugin, we have a DHCP server configured to assign a limited amount of addresses (dedicated to pxe booting hosts). The remaining addresses are left out of the DHCP scope for being permanently assigned to the hosts. Foreman is configured to autosuggest IPs outside of the DHCP range.
This is what happens:- boot new host, it gets discovered
- open the "provision" > "interfaces" tab. The IP pre-assigned is the one that has been provided by DHCP during PXE boot
- Manually change the address to an address of choice from outside the DHCP range, since we don't want to use the DHCP one. This will be the real host IP
- Submit. Foreman throws a "DHCP records <mac>/<IP> already exists" warning and asks if I want to overwrite it
Is this the expected behavior? The lease is indeed there because of the PXE boot, so the conflict warning makes sense.
I would like foreman to let me choose whatever IP I want for the host, instead, and skip the temporary PXE IP from the conflict validation.
The conflict error appears even when configuring the IPAM dropdown in the subnet config to "none".
This occurs only with Discovery. Setting up a new host from scratch works well and no conflicts are reported, both in IPAM DHCP or IPAM None mode.
I read a few threads dealing with the same situation but it's still not clear to me what would be the suggested DHCP deployment scenario.
I am attaching part of the Foreman log in debug mode, showing the conflict.
Thanks!
Versions
Foreman 1.13.2
Ubuntu 16.04.1
Files
Updated by Lukas Zapletal about 8 years ago
- Project changed from Foreman to Discovery
- Category deleted (
Host creation)
Thanks, if you do this without changing hostname of the discovered host, does it also trigger?
Updated by N V about 8 years ago
Lukas Zapletal wrote:
Thanks, if you do this without changing hostname of the discovered host, does it also trigger?
Hello Lukas, thank you. Yes, I confirm I am keeping the autogenerated hostname in the form "mac<macaddress>".
Updated by N V almost 8 years ago
Lukas Zapletal wrote:
Thanks, if you do this without changing hostname of the discovered host, does it also trigger?
Hello Lukas, has there been any progress on this issue? Although I'm not a coder I would love to be of any help if possible.
In what file is the IP assignment logic implemented? Thanks.
Updated by Lukas Zapletal almost 8 years ago
- Related to Bug #16143: Discovered host IP address is not changed to fall within the subnet range added
Updated by Lukas Zapletal almost 8 years ago
Sorry I think you are hitting this bugreport #16143 whith is a WIP. If this bothers you, keep pinging me if I don't get back to it soon, got busy plate but I will get there :-)
Updated by N V almost 8 years ago
Lukas Zapletal wrote:
Sorry I think you are hitting this bugreport #16143 whith is a WIP. If this bothers you, keep pinging me if I don't get back to it soon, got busy plate but I will get there :-)
Hello, no problem! I can imagine the load must be high.
Our deployment of Foreman is currently stalled due to this issue. It's not overly critical but upper mgmt will start questioning :)
I would be happy with a workaround, even at the architectural level, if necessary.
Thanks.