[Kea-users] max-unacked-clients definition

Kraishak Mahtha kraishak.edu at gmail.com
Thu Jun 22 14:42:08 UTC 2023


Hi All,
I am using the kea in HA mode with Hot-standby mode in my local lab testing
before I use it in production and here is my failover config section:
  "hooks-libraries": [
        {
            "library": "/var/lib/kea/hooks/libdhcp_ha.so",
            "parameters": {"high-availability": [{
                "mode": "hot-standby",
                "heartbeat-delay": 10000,
                "trust-anchor": "",
                "multi-threading": {
                    "http-dedicated-listener": true,
                    "enable-multi-threading": true,
                    "http-client-threads": 4,
                    "http-listener-threads": 4
                },
                "max-response-delay": 60000,
                "cert-file": "",
                "this-server-name": "dhcp1",
                "max-ack-delay": 10000,
                "peers": [
                    {
                        "role": "primary",
                        "name": "dhcp1",
                        "auto-failover": true,
                        "url": "http://192.168.0.125:8001"
                    },
                    {
                        "role": "standby",
                        "name": "dhcp2",
                        "auto-failover": true,
                        "url": "http://192.168.0.126:8001"
                    }
                ],
                "key-file": "",
                "max-unacked-clients": 2
            }]}
        },
The other part of the configuration is the same for both servers.

I am testing the case by stopping the primary appliance and see how the
other peer reacts, and whether it can continue the service for the existing
and new clients

The problem I see is with max-unacked-clients parameter, I set the value to
2 and after stopping the primary I hit the command (ipconfig /renew)for a
new client and I am unable to get leases so checked the following:
Status-output
============
{
  "arguments": {
    "high-availability": [
      {
        "ha-mode": "hot-standby",
        "ha-servers": {
          "local": {
            "role": "standby",
            "scopes": [],
            "state": "hot-standby"
          },
          "remote": {
            "age": 327,
            "analyzed-packets": 145,
            "communication-interrupted": true,
            "connecting-clients": 3,
            "in-touch": true,
            "last-scopes": [
              "dhcp1"
            ],
            "last-state": "unavailable",
            "role": "primary",
            "unacked-clients": 1,
            "unacked-clients-left": 2
          }
        }
      }
    ],
    "multi-threading-enabled": true,
    "packet-queue-size": 29,
    "packet-queue-statistics": [
      1,
      0.999997,
      0.719168
    ],
    "pid": 17707,
    "reload": 6093,
    "sockets": {
      "status": "ready"
    },
    "thread-pool-size": 7,
    "uptime": 7488
  },
  "result": 0
}
  --> From the above status I have a few doubts, I set the max-unacked
clients as 2 in my config but in the above status output it says
 "unacked-clients": 1,
 "unacked-clients-left": 2
Does that mean it is checking for 3 max-unacked clients to switch to
partner-down state?
If yes when can we call the client can be counted as unacked clients, I am
not getting the leases for more than 5 laptops, and also I collected the
tcpdump during that time to see the time elapsed seconds for discover
packet, for few of the client it reached more than 20 seconds but still I
don't see they get leases. The main reason I can think of here the status
is not changed to partner-down and hence it is unable to give a lease but
the reason behind that is max-unacked client,

When I do the same with max-unacked client values as zero, I don't see any
issue, and clients are able to get the lease because it switched to
partner-down fastly

When can we consider the client under max-unacked client ?

I thought if the client sends a request and the server is unable to grant a
lease then it can consider an unacked client but here when the client is
sending the request to the stand-by server then we are seeing in the log as

2023-06-22 13:36:50.943 DEBUG [kea-dhcp4.ha-hooks/17707.140342512834304]
HA_BUFFER4_RECEIVE_NOT_FOR_US [hwtype=1 08:6a:c5:82:de:a8],
cid=[01:08:6a:c5:82:de:a8], tid=0xaaba6094: dropping query to be processed
by another server

and is not considered as un-ackedclient, so back to square when can we
consider a client request as unacked ?


Thanks in Advance
Kraishak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230622/42b70fe5/attachment.htm>


More information about the Kea-users mailing list