<div dir="ltr"><div>Hi Jason,</div><div><br></div><div>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.</div><div><br></div><div>Thank you,</div><div>Darren Ankney</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Apr 3, 2025 at 1:10 PM Jason Creviston <<a href="mailto:jcreviston@weendeavor.com">jcreviston@weendeavor.com</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"><div class="msg-146699884131406599">




<div dir="ltr">
<div style="font-size:13pt;color:rgb(23,78,134)">
Hmmm. Thanks for the clarification Doug.</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
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).</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
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.</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
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
<code>lease4-get</code> command.</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
const body = JSON.stringify({</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
    "command": "lease4-del",</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
    "service": [ "dhcp4" ],</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
    "arguments": {</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
      "ip-address": `${ip}`</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
    }</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
  })</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
  try {</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
    const delete_result = await fetch(`http://${server}:8000`, {</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
      method: 'POST',</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
      body,</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
      headers: {</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
        'Content-Type': 'application/json',</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
      }</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
    })</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div style="line-height:19px;font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
Thanks,</div>
<div style="font-size:13pt;color:rgb(23,78,134)">
<br>
</div>
<div id="m_-4546586361700482942appendonsend"></div>


<br>
<table id="m_-45465863617004829420.hz7mej3tpto" style="width:397px" cellspacing="0" cellpadding="0">
  <tbody>
  <tr>
    <td style="font-size:10pt;width:397px" valign="top" colspan="3"><span style="font-size:14pt;font-family:"Gill Sans";color:rgb(31,94,173)"><b style="font-size:16pt;font-family:Helvetica">Jason Creviston<span style="font-size:12pt"></span></b><br style="color:rgb(31,94,173)"><span style="font-size:12pt;font-family:"Century Gothic";color:rgb(31,94,173)">Sr. Network Administrator</span><br></span></td></tr>
  <tr>
    <td style="font-size:8pt;width:397px" valign="top" colspan="3"><span style="font-size:8pt;font-family:"Century Gothic"">P: 765-795-9305               </span><span style="font-size:8pt"><span style="font-family:"Century Gothic"">2 S. West Street – P.O. Box 237, 
      Cloverdale, IN 461</span></span><span style="font-size:8pt"><span style="font-size:8pt"><span style="font-family:"Century Gothic"">20<br><a href="https://outlook.office365.com/owa/calendar/JasonCreviston@weendeavor.com/bookings/" target="_blank">Book an appointment with me!</a><br></span></span></span></td>
    </tr>
  <tr>
    <td style="border-width:1px 0px 0px;font-size:10pt;border-top-style:solid;border-color:rgb(31,94,173) rgb(255,255,255) rgb(255,255,255);width:120px;padding:10px 0px;border-left-style:initial;border-right-style:initial;border-bottom-style:initial" valign="middle" align="center"><img id="m_-45465863617004829420.7qg23aouu9m" border="0" src="cid:ii_195fcb93445649190611"></td>
    <td style="border-width:1px 0px 0px;font-size:10pt;border-top-style:solid;border-color:rgb(31,94,173) rgb(255,255,255) rgb(255,255,255);width:120.435px;padding:10px 0px;border-left-style:initial;border-right-style:initial;border-bottom-style:initial" valign="middle" align="center"><img id="m_-45465863617004829420.9wyp5hye8oi" style="width: 62px; height: 25px;" border="0" src="cid:ii_195fcb93445b55742d92" width="62" height="25"></td>
    <td style="border-width:1px 0px 0px;font-size:10pt;border-top-style:solid;border-color:rgb(31,94,173) rgb(255,255,255) rgb(255,255,255);width:156.565px;padding:10px 0px;border-left-style:initial;border-right-style:initial;border-bottom-style:initial;text-align:left" valign="middle" align="center" colspan="1">    <img id="m_-45465863617004829420.i3a5sauisie" border="0" src="cid:ii_195fcb93446400be3c03"><br></td>
     </tr>
  <tr>
    <td style="width:120px;padding:5px 0px;font-size:9pt" valign="middle" align="center"><a href="http://weendeavor.com/" style="font-size:9pt;font-family:"Century Gothic"" title="" target="_blank">weEndeavor.com</a></td>
    <td style="width:120.435px;padding:5px 0px;font-family:"Century Gothic";font-size:9pt" valign="middle" align="center"><font face="Gill Sans Nova Light, sans-serif" style="font-family:"Century Gothic";font-size:9pt"><span style="font-size:9pt;font-family:"Century Gothic""><a title="" href="http://gigtel.com/" style="font-family:"Century Gothic";font-size:9pt" target="_blank">GigTel.com</a></span></font></td>
    <td style="width:156.565px;padding:5px 0px;font-family:"Century Gothic";font-size:9pt;text-align:left" valign="middle" align="center" colspan="1">   <a href="http://EndeavorIT.com" title="" target="_blank">EndeavorIT.com</a><br></td></tr>
  <tr>
    <td style="font-size:8pt;font-family:"Century Gothic";width:397px;color:rgb(166,166,166);line-height:9pt" valign="top" colspan="3">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. 
</td></tr></tbody></table>
<hr style="display:inline-block;width:98%">
<div id="m_-4546586361700482942divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Kea-users <<a href="mailto:kea-users-bounces@lists.isc.org" target="_blank">kea-users-bounces@lists.isc.org</a>> on behalf of Doug Freed <<a href="mailto:dwfreed@isc.org" target="_blank">dwfreed@isc.org</a>><br>
<b>Sent:</b> Thursday, April 3, 2025 11:19 AM<br>
<b>To:</b> <a href="mailto:kea-users@lists.isc.org" target="_blank">kea-users@lists.isc.org</a> <<a href="mailto:kea-users@lists.isc.org" target="_blank">kea-users@lists.isc.org</a>><br>
<b>Subject:</b> Re: [Kea-users] HA syncing lease database</font>
<div> </div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div>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.<br>
<br>
I think it's important to note here for clarity that lease updates are<br>
transferred between HA participants as they happen after the initial<br>
sync during HA setup is done.<br>
<br>
-Doug<br>
<br>
On 4/3/25 9:42 AM, Peter Davies wrote:<br>
> Hi Jason,<br>
>     In HA, leases are synchronized each time a HA session is established.<br>
> Typically, when one of the HA partners has been restarted.<br>
> This is governed by the "sync-lease" HA setting,which default to "true."<br>
><br>
> The "ha-sync"  API command is used to synchronize the leases between Kea<br>
> servers.<br>
> See:<a href="https://kea.readthedocs.io/en/kea-2.7.7/arm/hooks.html#control-" target="_blank">https://kea.readthedocs.io/en/kea-2.7.7/arm/hooks.html#control-</a><br>
> commands-for-high-availability<br>
><br>
><br>
><br>
> /Peter<br>
><br>
> On 03/04/2025 15.20, Jason Creviston wrote:<br>
>> Does anyone know how often leases sync? We're using memfile to store<br>
>> leases. The only thing I could find in the docs was "synchronizing the<br>
>> lease database as needed".<br>
>><br>
>> The leases between our HA pair are out of sync, and I'm curious how<br>
>> often the primary sends the |ha-sync| command to the secondary.<br>
>> Stork's Leases Search feature is showing a valid IP lease for an<br>
>> address, but it's only reporting that from the secondary unit. The<br>
>> lease was allocated on 4/2 12:58 and expires today. I cleared the<br>
>> lease from a javascript application at some point yesterday afternoon.<br>
>> I figured the servers would've sync'd leases by now.<br>
>><br>
>><br>
>> Thanks,<br>
>><br>
>><br>
>> *Jason Creviston*<br>
>> Sr. Network Administrator<br>
>> P: 765-795-9305 2 S. West Street – P.O. Box 237, Cloverdale, IN 46120<br>
>> Book an appointment with me! <<a></a><a href="https://outlook.office365.com/owa/" target="_blank">https://outlook.office365.com/owa/</a><br>
>> calendar/<a href="http://JasonCreviston@weendeavor.com/bookings/" target="_blank">JasonCreviston@weendeavor.com/bookings/</a>><br>
>><br>
>> weEndeavor.com <<a href="http://weendeavor.com/" target="_blank">http://weendeavor.com/</a>>      GigTel.com <http://<br>
>> <a href="http://gigtel.com/" target="_blank">gigtel.com/</a>>         EndeavorIT.com <<a href="http://EndeavorIT.com" target="_blank">http://EndeavorIT.com</a>><br>
>> CONFIDENTIALITY NOTICE: The information in this Email and my<br>
>> attachments are confidential and may be privileged. This Email is<br>
>> intended solely for the named recipient or recipients. If you are not<br>
>> the intended recipient, any use, disclosure, copying or distribution<br>
>> of this Email is prohibited. If you are not the intended recipient,<br>
>> please inform us by replying with the subject line "Wrong Address" and<br>
>> then delete this Email and any attachments. Endeavor Communications<br>
>> uses regularly updated anti-virus software in an attempt to reduce the<br>
>> possibility of transmitting computer viruses. We do not guarantee,<br>
>> however, that any attachments to this Email are virus-free.<br>
>><br>
>><br>
> --<br>
> Peter Davies<br>
> Support Engineer<br>
> Internet Systems Corporation<br>
> <a href="mailto:peterd@isc.org" target="_blank">peterd@isc.org</a><br>
> 001 650-423-1460<br>
><br>
><br>
<br>
--<br>
ISC funds the development of this software with paid support subscriptions. Contact us at
<a href="https://www.isc.org/contact/" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
<br>
Kea-users mailing list<br>
<a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</div>
</span></font></div>
</div>

-- <br>
ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
<br>
Kea-users mailing list<br>
<a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</div></blockquote></div>