Primary / Secundary cluster with synced leases created using omapi

Matt . yamakasi.014 at gmail.com
Sun Aug 7 17:27:52 UTC 2016


Hi Glenn,

OK, thanks a lot.

So my best bet is to write to both servers @ the same time using the
omapi it seems ?

If so, I need to make some workaround for that.

Cheers,

Matt

2016-08-07 17:08 GMT+02:00 Glenn Satchell <glenn.satchell at uniq.com.au>:
> Hi Matt
>
> If you are running failover, then the dhcpd.leases files on each system
> are not the same. It records information about the state of the partner's
> leases and it's own leases with different flags. If you search through the
> file on each system looking for a lease for the same IP address you can
> see what I mean.
>
> There is more info in the dhcpd.leases man page, although most of the
> discussion is about the file format.
>
> regards,
> -glenn
>
> On Sun, August 7, 2016 11:58 pm, Matt . wrote:
>> OK, this clears it out.
>>
>> Why would it not be possible to sync the leases file then ? Or is
>> there some other database style file which going to be corrupted or is
>> it that the running process doesn't know the synced data on the host
>> which hasn't have it added through omapi ?
>>
>>
>>
>>
>> 2016-08-07 14:18 GMT+02:00 Glenn Satchell <glenn.satchell at uniq.com.au>:
>>> This style of host declaration creates a static lease. If it set in
>>> dhcpd.conf it does not generate an entry in the leases file, and it is
>>> not
>>> handled by the failover protocol.
>>>
>>> In your case, if you add the entry via omapi, then you need to do the
>>> same
>>> operation to the second dhcp server.
>>>
>>> The equivalent would be defining the host declarations in the dhcpd.conf
>>> on both dhcp servers.
>>>
>>> regards,
>>> -glenn
>>>
>>> On Sun, August 7, 2016 10:05 pm, Matt . wrote:
>>>> What I mean by static leases is:
>>>>
>>>> host myhostname {
>>>>  hardware ethernet 00:20:00:2c:5b:7a;
>>>>  fixed-address 192.168.1.250;
>>>> }
>>>>
>>>> That is what I cannot do, but is no issue if the added leases my
>>>> omapi, so reserved flag as you call them, are synched to the secondary
>>>> server, and that is not happening it seems.
>>>>
>>>> I need to know if it doesn't happen at all and it's not the way how
>>>> it's designed or something is just not working here.
>>>>
>>>>
>>>>
>>>>
>>>> 2016-08-07 13:44 GMT+02:00 Simon Hobson <dhcp1 at thehobsons.co.uk>:
>>>>> 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.
>>>>>
>>>>> _______________________________________________
>>>>> dhcp-users mailing list
>>>>> dhcp-users at lists.isc.org
>>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>> _______________________________________________
>>>> dhcp-users mailing list
>>>> dhcp-users at lists.isc.org
>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> dhcp-users mailing list
>>> dhcp-users at lists.isc.org
>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users


More information about the dhcp-users mailing list