Discovery, DHCP and uids

Hello,

some systems (Dell PowerEdge in my case) sends out a DHCP UID during PXE
booting. The ISC DHCP server creates a lease similar to this one:

lease 192.168.99.5 {
starts 2 2014/10/14 09:10:32;
ends 2 2014/10/14 09:20:32;
cltt 2 2014/10/14 09:10:32;
binding state active;
next binding state free;
hardware ethernet aa:bb:cc:dd:ee:ff;
uid "\000DELLX\000\020X\100X\123\100O011";
}

Once the system is booted into installer (or discovery) it requests for
a new lease. ISC DHCP is configured to respect uids, therefore new lease
is created.

Now, it is possible to configure dhcpd to ignore the uids. If I
understand "deny duplicates" configuration option correctly, when I set
it, dhcpd should ignore uids and take only MAC addresses into account.

The problem I have is that foreman (and proxy) ignore the uids therefore
I get DHCP conflicts depending on how the leases file is loaded (if the
record with the uid entry is loaded before/after the one without it).

Anyone have experiences with this? Is my assumption correct? Do you
experience such conflicts?

··· -- Later, Lukas #lzap Zapletal

> Now, it is possible to configure dhcpd to ignore the uids. If I
> understand "deny duplicates" configuration option correctly, when I set
> it, dhcpd should ignore uids and take only MAC addresses into account.

I misunderstood the "deny duplicates" configuration. It works only for
reservations (host entries), not lease vs lease.

··· -- Later, Lukas #lzap Zapletal

Yeah, I've seen this - it was the base cause of the DHCP work I was doing
in the proxy a few months back. However, it should be fine now. The proxy
code should only look at the most recent lease (i.e last-lease-wins, which
is how DHCP itself reads the file) for a mac/ip combo, so if a new lease
has been issued for the host, the old uid-lease should be ignored. Are you
not seeing that?

Did it get into Foreman 1.5? If you could find a PR that would help.

··· On Monday 20 of October 2014 10:52:47 Greg Sutcliffe wrote: > Yeah, I've seen this - it was the base cause of the DHCP work I was doing > in the proxy a few months back. However, it *should* be fine now. The proxy > code should only look at the most recent lease (i.e last-lease-wins, which > is how DHCP itself reads the file) for a mac/ip combo, so if a new lease > has been issued for the host, the old uid-lease should be ignored. Are you > not seeing that?


Marek

> in the proxy a few months back. However, it should be fine now. The proxy
> code should only look at the most recent lease (i.e last-lease-wins, which
> is how DHCP itself reads the file) for a mac/ip combo, so if a new lease
> has been issued for the host, the old uid-lease should be ignored. Are you
> not seeing that?

Right, I've already found out. Thanks.

··· -- Later, Lukas #lzap Zapletal


https://github.com/theforeman/smart-proxy/pull/155

··· On 20/10/14 12:10, Marek Hulan wrote: > On Monday 20 of October 2014 10:52:47 Greg Sutcliffe wrote: >> Yeah, I've seen this - it was the base cause of the DHCP work I was doing >> in the proxy a few months back. However, it *should* be fine now. The proxy >> code should only look at the most recent lease (i.e last-lease-wins, which >> is how DHCP itself reads the file) for a mac/ip combo, so if a new lease >> has been issued for the host, the old uid-lease should be ignored. Are you >> not seeing that? > > Did it get into Foreman 1.5? If you could find a PR that would help.


Dominic Cleal
Red Hat Engineering