Ok, thanks Darren. I can definitely do that.

I wasn't expecting the API calls to sync, but rather the HA to trigger a lease 
sync if one of the servers received a command to delete a lease.

Knowing this now, is it safe to say that the leases only sync when normal DHCP 
DORA traffic is processed?


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/jasoncrevis...@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-boun...@lists.isc.org> on behalf of Darren Ankney 
<darren.ank...@gmail.com>
Sent: Thursday, April 3, 2025 1:37 PM
To: Kea user's list <kea-users@lists.isc.org>
Subject: Re: [Kea-users] HA syncing lease database

Hi Jason,

If you want to manually manipulate the leases (which is normally not 
recommended, but I assume you have good reason for doing this), then you'll 
have to send the  delete to both servers.  I do not believe that these API 
calls will be synced.

Thank you,
Darren Ankney

On Thu, Apr 3, 2025 at 1:10 PM Jason Creviston 
<jcrevis...@weendeavor.com<mailto:jcrevis...@weendeavor.com>> wrote:
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/jasoncrevis...@weendeavor.com/bookings/>

[cid:ii_195fcb93445649190611]   [cid:ii_195fcb93445b55742d92]       
[cid:ii_195fcb93446400be3c03]

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-boun...@lists.isc.org<mailto:kea-users-boun...@lists.isc.org>> on 
behalf of Doug Freed <dwfr...@isc.org<mailto:dwfr...@isc.org>>
Sent: Thursday, April 3, 2025 11:19 AM
To: kea-users@lists.isc.org<mailto:kea-users@lists.isc.org> 
<kea-users@lists.isc.org<mailto:kea-users@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/jasoncrevis...@weendeavor.com/bookings/<http://jasoncrevis...@weendeavor.com/bookings/>>
>>
>> weEndeavor.com <http://weendeavor.com/>      GigTel.com <http://
>> 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
> pet...@isc.org<mailto:pet...@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@lists.isc.org<mailto:Kea-users@lists.isc.org>
https://lists.isc.org/mailman/listinfo/kea-users
--
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@lists.isc.org<mailto:Kea-users@lists.isc.org>
https://lists.isc.org/mailman/listinfo/kea-users
-- 
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@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to