<div dir="ltr"><div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div></div></div></div></div></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 28, 2021 at 3:00 PM Simon Hobson <<a href="mailto:dhcp1@thehobsons.co.uk">dhcp1@thehobsons.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Gregory Sloop <<a href="mailto:gregs@sloop.net" target="_blank">gregs@sloop.net</a>> wrote:<br>
<br>
> Given what I've been able to dig up on the subject of omapi and peers, I'm pretty sure you have to run against both, explicitly.<br>
> <br>
> But, additional complication arise!<br>
> <br>
> As noted, a fair bit of reading and searching seems to indicate you have to run the omshell commands against each server.<br>
> However, this is particularly interesting (or perhaps troubling.)<br>
> See: <a href="https://lists.isc.org/mailman/htdig/dhcp-users/2006-July/001102.html" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/htdig/dhcp-users/2006-July/001102.html</a><br>
> <br>
> To save you the click, I'll quote...<br>
> ---<br>
> "You will have to rerun the statement on both peers.<br>
> Take careful note of servers that lose their dhcpd.leases files, you'll have to be able to 0-to-60 them by replaying everything. "<br>
> ---<br>
> <br>
> There was no expansion on this - and my understanding of it is somewhat ambiguous.<br>
> Does this mean that if I have a peer that gets rebuild and the leases file is deleted, it won't get a copy of the "original" leases file from it's peer and that all the "reservation" flags will be lost and I will have to re-run all the omapi commands against the peer which lost the leases file?<br>
> <br>
> Assuming that's the correct interpretation...<br>
> I suppose that it's best then, to copy the leases file from the "still-up' peer to the rebuilt peer. (I can't see a reason not to do this, but perhaps I'm missing something.)<br>
<br>
That is indeed an odd statement.<br>
I can completely understand it for a standalone peer - if it loses it's leases file then all your OMAPI made changes will be gone.<br>
<br>
But since the a major point of failover is for a server to be able to rebuild itself after a disaster, I would have expected failover to take care of that. I suggest you do a trial with a test server - my expectation is that if you bring up the peer with no leases file, then it'll get everything from it's partner.<br>
<br>
However, the warning still holds. Should your shared leases get corrupted or lost, then you'd lose all your changes and need to re-play them. I'm not sure under what circumstances both servers could lose/corrupt their leases, but I'm sure there will be some.<br>
I know that on a single server, if you remove some addresses from the defined ranges, then any leases defined for them will be removed on server startup. So, especially if you build a config and run it out to both servers at once, it's possible to lose a bunch of leases that way.<br>
<br>
Simon<br>
<br></blockquote><div>If I understand what Gregory is asking, he is configuring 'host' entries using OMAPI.  The failover protocol will copy the 'lease' information, but the 'host' entries would need to be set using OMAPI on each server, and set again if the server loses them.  Does that make sense?</div><div><br></div><div>-- </div><div>Bob Harold</div><div><br></div></div></div>