Primary / Secundary cluster with synced leases created using omapi
dhcp1 at thehobsons.co.uk
Sun Aug 7 11:44:02 UTC 2016
Matt . <yamakasi.014 at gmail.com> wrote:
> I'm having an issue with a setup where I can't set static leases.
Define what you mean by static leases.
Do you mean a host statement with a "fixed address" statement, or a lease with the reserved flag set ?
I assume you mean the former, and that means that what you are setting isn't a "lease" in the conventional sense - host statements with fixed address do not create a lease through the normal lifetime. Normally these do not appear in the leases file at all, and I suspect that they do not get processed by failover either.
I'm assuming that they appear in the leases file when created via OMAPI as otherwise there would be no persistent storage of them.
So in this case, you need to apply the change to both servers.
Or, use reserved leases and failover which should work.
BTW - syncing the leases file is "fraught with difficulties" and is guaranteed to break things unless you use nothing but these static leases. The server you sync the file *to* will ignore it unless you stop the dhcpd service, swap out the file, and start the dhcpd service. This is because the leases file is "write only" - it is read once at service startup, and then it is only written (so there's persistent storage) - all the working data is held in ram.
More information about the dhcp-users