[Kea-users] HA syncing lease database
Jason Creviston
jcreviston at weendeavor.com
Thu Apr 3 17:09:41 UTC 2025
Hmmm. Thanks for the clarification Doug.
Now I'm wondering why the secondary is holding onto this lease. I've checked Stork, and the HA status between the pair is good (per Stork; screenshot attached, if those come through).
This takes me back to the timing of lease updates. Is it supposed to be in relative realtime? I was just able to replicate the issue again.
To be clear, when I'm deleting the lease on the primary server, I'm running the below command within a javascript app. This is successful on the primary, which I can verify within Stork, and my javascript code when searching for the lease with a lease4-get command.
const body = JSON.stringify({
"command": "lease4-del",
"service": [ "dhcp4" ],
"arguments": {
"ip-address": `${ip}`
}
})
try {
const delete_result = await fetch(`http://${server}:8000`, {
method: 'POST',
body,
headers: {
'Content-Type': 'application/json',
}
})
Thanks,
Jason Creviston
Sr. Network Administrator
P: 765-795-9305 2 S. West Street – P.O. Box 237, Cloverdale, IN 46120
Book an appointment with me!<https://outlook.office365.com/owa/calendar/JasonCreviston@weendeavor.com/bookings/>
[cid:codetwo-signature-logo-endeavor_1c9b8f6f-f797-4b22-a7d8-b9c8f1b0c327.png] [cid:codetwo-gigtel-logo2_e109b7e4-b185-40fc-94f2-947f96c612cf.png] [cid:endeavor-it-signature-2_cad37e9b-ad7b-4219-a677-f37914c8d32a.png]
weEndeavor.com<http://weendeavor.com/> GigTel.com<http://gigtel.com/> EndeavorIT.com<http://EndeavorIT.com>
CONFIDENTIALITY NOTICE: The information in this Email and my attachments are confidential and may be privileged. This Email is intended solely for the named recipient or recipients. If you are not the intended recipient, any use, disclosure, copying or distribution of this Email is prohibited. If you are not the intended recipient, please inform us by replying with the subject line "Wrong Address" and then delete this Email and any attachments. Endeavor Communications uses regularly updated anti-virus software in an attempt to reduce the possibility of transmitting computer viruses. We do not guarantee, however, that any attachments to this Email are virus-free.
________________________________
From: Kea-users <kea-users-bounces at lists.isc.org> on behalf of Doug Freed <dwfreed at isc.org>
Sent: Thursday, April 3, 2025 11:19 AM
To: kea-users at lists.isc.org <kea-users at lists.isc.org>
Subject: Re: [Kea-users] HA syncing lease database
CAUTION: This email is from OUTSIDE our organization. Please do not open/download any attachment or click any link unless you know it's safe.
I think it's important to note here for clarity that lease updates are
transferred between HA participants as they happen after the initial
sync during HA setup is done.
-Doug
On 4/3/25 9:42 AM, Peter Davies wrote:
> Hi Jason,
> In HA, leases are synchronized each time a HA session is established.
> Typically, when one of the HA partners has been restarted.
> This is governed by the "sync-lease" HA setting,which default to "true."
>
> The "ha-sync" API command is used to synchronize the leases between Kea
> servers.
> See:https://kea.readthedocs.io/en/kea-2.7.7/arm/hooks.html#control-
> commands-for-high-availability
>
>
>
> /Peter
>
> On 03/04/2025 15.20, Jason Creviston wrote:
>> Does anyone know how often leases sync? We're using memfile to store
>> leases. The only thing I could find in the docs was "synchronizing the
>> lease database as needed".
>>
>> The leases between our HA pair are out of sync, and I'm curious how
>> often the primary sends the |ha-sync| command to the secondary.
>> Stork's Leases Search feature is showing a valid IP lease for an
>> address, but it's only reporting that from the secondary unit. The
>> lease was allocated on 4/2 12:58 and expires today. I cleared the
>> lease from a javascript application at some point yesterday afternoon.
>> I figured the servers would've sync'd leases by now.
>>
>>
>> Thanks,
>>
>>
>> *Jason Creviston*
>> Sr. Network Administrator
>> P: 765-795-9305 2 S. West Street – P.O. Box 237, Cloverdale, IN 46120
>> Book an appointment with me! <https://outlook.office365.com/owa/
>> calendar/JasonCreviston at weendeavor.com/bookings/>
>>
>> weEndeavor.com <http://weendeavor.com/> GigTel.com <http://
>> gigtel.com/> EndeavorIT.com <http://EndeavorIT.com>
>> CONFIDENTIALITY NOTICE: The information in this Email and my
>> attachments are confidential and may be privileged. This Email is
>> intended solely for the named recipient or recipients. If you are not
>> the intended recipient, any use, disclosure, copying or distribution
>> of this Email is prohibited. If you are not the intended recipient,
>> please inform us by replying with the subject line "Wrong Address" and
>> then delete this Email and any attachments. Endeavor Communications
>> uses regularly updated anti-virus software in an attempt to reduce the
>> possibility of transmitting computer viruses. We do not guarantee,
>> however, that any attachments to this Email are virus-free.
>>
>>
> --
> Peter Davies
> Support Engineer
> Internet Systems Corporation
> peterd at isc.org
> 001 650-423-1460
>
>
--
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
Kea-users mailing list
Kea-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20250403/a83ce92a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codetwo-signature-logo-endeavor_1c9b8f6f-f797-4b22-a7d8-b9c8f1b0c327.png
Type: image/png
Size: 1897 bytes
Desc: codetwo-signature-logo-endeavor_1c9b8f6f-f797-4b22-a7d8-b9c8f1b0c327.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20250403/a83ce92a/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codetwo-gigtel-logo2_e109b7e4-b185-40fc-94f2-947f96c612cf.png
Type: image/png
Size: 1039 bytes
Desc: codetwo-gigtel-logo2_e109b7e4-b185-40fc-94f2-947f96c612cf.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20250403/a83ce92a/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: endeavor-it-signature-2_cad37e9b-ad7b-4219-a677-f37914c8d32a.png
Type: image/png
Size: 1214 bytes
Desc: endeavor-it-signature-2_cad37e9b-ad7b-4219-a677-f37914c8d32a.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20250403/a83ce92a/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ha.png
Type: image/png
Size: 51951 bytes
Desc: ha.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20250403/a83ce92a/attachment-0007.png>
More information about the Kea-users
mailing list