<div dir="ltr">Hi Peter,<div><br></div><div>ok, I tried this way stopping the kea-dhcp service on failover and see if that will make a difference, and see if the client get able to get the ACK, </div><div><br></div><div>I have three doubts, </div><div>1)I stopped kea-DHCP on failover and it crossed the max-response-delay time i.e 60000, and also it crosses the max-unacked-clients values too but still, the failover state is showing as communication-recovery not sure when it will change to partner-down state.</div><div>HA code snippet:</div><div>==============</div><div> "hooks-libraries": [</div> {<br> "library": "/usr/local/kea/hooks/libdhcp_ha.so",<br> "parameters": {"high-availability": [{<br> "mode": "load-balancing",<br> "heartbeat-delay": 10000,<br> "trust-anchor": "",<br> "multi-threading": {<br> "http-dedicated-listener": true,<br> "enable-multi-threading": true,<br> "http-client-threads": 4,<br> "http-listener-threads": 4<br> },<br> "max-response-delay": 60000,<br> "cert-file": "",<br> "this-server-name": "dhcp1",<br> "max-ack-delay": 10000,<br> "peers": [<br> {<br> "role": "primary",<br> "name": "dhcp1",<br> "auto-failover": true,<br> "url": "<a href="http://192.168.0.125:8001">http://192.168.0.125:8001</a>"<br> },<br> {<br> "role": "secondary",<br> "name": "dhcp2",<br> "auto-failover": true,<br> "url": "<a href="http://192.168.0.126:8001">http://192.168.0.126:8001</a>"<br> }<br> ],<br> "key-file": "",<br> "max-unacked-clients": 13<br> }]}<br> },<br><div><br></div><div> status get output:</div><div>=================</div><div>[root@dhcp1 ~]# echo '{"command":"status-get"}' | socat - UNIX:/var/kea4-ctrl-socket | jq<br>{<br> "arguments": {<br> "high-availability": [<br> {<br> "ha-mode": "load-balancing",<br> "ha-servers": {<br> "local": {<br> "role": "primary",<br> "scopes": [<br> "dhcp1"<br> ],<br> "state": "communication-recovery"<br> },<br> "remote": {<br> "age": 4141,<br> "analyzed-packets": 93,<br> "communication-interrupted": true,<br> "connecting-clients": 19,<br> "in-touch": true,<br> "last-scopes": [<br> "dhcp2"<br> ],<br> "last-state": "unavailable",<br> "role": "secondary",<br> "unacked-clients": 1,<br> "unacked-clients-left": 13<br> }<br> }<br> }<br> ],<br> "multi-threading-enabled": true,<br> "packet-queue-size": 7,<br> "packet-queue-statistics": [<br> 1,<br> 0.954504,<br> 0.23734<br> ],<br> "pid": 14491,<br> "reload": 4284,<br> "sockets": {<br> "status": "ready"<br> },<br> "thread-pool-size": 4,<br> "uptime": 4284<br> },<br> "result": 0<br>}<br></div><div><br></div><div> </div><div>2)Based on the hash value the kea-dhcp will decide which server to grant leases but now even after kea-dhcp is down on failover the primary is not able to give a lease, it completed the max-ack-delay duration too but still it is dropping the packet </div><div>last, </div><div>3)Can we manually set the failover state to partner-down and is it recommended?<br></div><div><br></div><div>Thanks</div><div>Kraishak</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 10, 2023 at 1:05 PM Peter Davies <<a href="mailto:peterd@isc.org">peterd@isc.org</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><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div><div>Hi Kraishak,</div><div> This behaviour is expected when HA is configured in "load-balancing" mode. </div><div><br></div><div>Under normal operations, the two Kea servers divide the clients between them. </div><div><br></div><div>The server decides which clients they need to respond to based on a hash of the </div><div>client identifier; this is often the client's Mac address. The split is 50/50.</div><div><br></div><div>Kind Regards Peter</div></div><div><br></div><hr id="m_2290115337151663652zwchr"><div><b>From: </b>"Kraishak Mahtha" <<a href="mailto:kraishak.edu@gmail.com" target="_blank">kraishak.edu@gmail.com</a>><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>Sent: </b>Wednesday, 10 May, 2023 08:45:08<br><b>Subject: </b>[Kea-users] Dropping the packets in load balancing<br></div><br><div><div dir="ltr">Hi all,<br><div>I have configured the kea-HA in load-balancing mode, and I am testing the flow by hitting the discover packets only to the primary server using my lease test tool but I see a few of the packets get dropped or have not been seen.</div><br><div> When I see the log I see as: <br></div><div>HA_BUFFER4_RECEIVE_NOT_FOR_US [hwtype=1 82:ff:ff:00:00:01], cid=[01:82:ff:ff:00:00:01], tid=0x29652559: dropping query to be processed by another server</div><br><div>I have a few doubts about this</div><div>1)I have only 10 active leases in the given scope range and we still have so many free leases then why does the server drop the query and hand it over to its peer? </div><div>2)Do we need to add any parameters in the config file to make the kea-DHCP primary to forcefully check its all free available IPs?</div><br><div>Thanks in advance </div><div>Kraishak</div><br><br><div>Attached are my kea-dhcp configs of primary and failover <br></div></div>
<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></div></div></blockquote></div>