Project

General

Profile

Actions

Bug #16143

closed

Discovered host IP address is not changed to fall within the subnet range

Added by Lukas Zapletal over 7 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Urgent
Category:
Discovery plugin
Target version:
Fixed in Releases:
Found in Releases:

Description

When booting a host for discovery my understanding is it is using an address from the pool configured in the /etc/dhcp/dhcpd.conf. When converting the host to discovered though the address is not changed to fall within the range specified for the subnet. This can lead to conflicts with later discovered hosts having the same IP address specified as an existing host record does. As reported in https://bugzilla.redhat.com/show_bug.cgi?id=1367549

I believe only auto-provisioning is affected. I tested this without discovery process (bare-metal - new host) and foreman core DOES honor this (I believe this was fixed last year). Therefore we need to correct this in discovery.

# lease of an external host
lease 192.168.223.11 {
  starts 3 2016/08/17 10:20:48;
  ends 0 2016/08/28 23:54:08;
  cltt 3 2016/08/17 10:20:48;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 52:54:00:5a:00:e0;
}
# host was created with the same MAC - reservation from range (110-240)
host test.nested.lan {
  dynamic;
  hardware ethernet 52:54:00:5a:00:e0;
  fixed-address 192.168.223.112;
        supersede server.filename = "pxelinux.0";
        supersede server.next-server = c0:a8:df:01;
        supersede host-name = "test.nested.lan";
}

We need to change traditional and quick provisioning as well in this regard. Changes might be required too.


Related issues 3 (1 open2 closed)

Related to Discovery - Bug #17613: Discovery, DHCP and lease conflictNew12/08/2016Actions
Related to Discovery - Bug #28330: Reboot/kexec is ussed against new (reserved) IP addressClosedLukas ZapletalActions
Is duplicate of Discovery - Bug #16132: When a Discovered Host is converted to a Managed Host the IP address is not changed to fall within the subnet rangeDuplicateLukas Zapletal08/16/2016Actions
Actions

Also available in: Atom PDF