Project

General

Profile

Actions

Bug #17613

open

Discovery, DHCP and lease conflict

Added by N V over 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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:
  1. boot new host, it gets discovered
  2. open the "provision" > "interfaces" tab. The IP pre-assigned is the one that has been provided by DHCP during PXE boot
  3. 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
  4. 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

dhcp_discovery_conflict.txt dhcp_discovery_conflict.txt 3.58 KB N V, 12/08/2016 11:13 AM

Related issues 1 (0 open1 closed)

Related to Discovery - Bug #16143: Discovered host IP address is not changed to fall within the subnet rangeClosedLukas ZapletalActions
Actions #1

Updated by Lukas Zapletal over 7 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?

Actions #2

Updated by N V over 7 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>".

Actions #3

Updated by N V about 7 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.

Actions #4

Updated by Lukas Zapletal about 7 years ago

  • Related to Bug #16143: Discovered host IP address is not changed to fall within the subnet range added
Actions #5

Updated by Lukas Zapletal about 7 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 :-)

Actions #6

Updated by N V about 7 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.

Actions

Also available in: Atom PDF