Kea 2.0.0 Fails to Allocate Leases
We are using Kea 2.0.0 version with backend database postgresql and observer an issue where lease not getting allocated/extended and producing below error message.
Note: Kea and Postgresql database is installed on same VM and has timezone EST set, also database timezone is set to EST but still this issue is happening, though this was running perfect from last 3 months after an upgrade from 1.5.0P1 to 2.0.0
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.dhcp4/1541.140278882691264] DHCP4_CLASS_ASSIGNED [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: client packet has been assigned to the following class(es): UNKNOWN
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.dhcp4/1541.140278882691264] DHCP4_CLASS_ASSIGNED [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: client packet has been assigned to the following class(es): ALL, HA_codcmdndh001, VENDOR_CLASS_MSFT 5.0, UNKNOWN
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.ddns/1541.140278882691264] DHCP4_CLIENT_FQDN_PROCESS [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: processing Client FQDN option
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.ddns/1541.140278882691264] DHCP4_CLIENT_FQDN_DATA [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: Client sent FQDN option: type=81 (CLIENT_FQDN), flags: (N=0, E=0, O=0, S=0), domain-name='compy' (partial)
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.ddns/1541.140278882691264] DHCP4_RESPONSE_FQDN_DATA [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: including FQDN option in the server's response: type=81 (CLIENT_FQDN), flags: (N=1, E=0, O=0, S=0), domain-name='compy.' (full)
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.dhcpsrv/1541.140278882691264] DHCPSRV_PGSQL_GET_CLIENTID obtaining IPv4 leases for client ID 01:9c:ad:97:16:83:2f
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.hosts/1541.140278882691264] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for subnet id 2 and IPv4 address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.hosts/1541.140278882691264] HOSTS_CFG_GET_ALL_ADDRESS4 get all hosts with reservations for IPv4 address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.hosts/1541.140278882691264] HOSTS_CFG_GET_ALL_ADDRESS4_COUNT using address 10.52.67.126, found 0 host(s)
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.hosts/1541.140278882691264] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 2 and address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.dhcpsrv/1541.140278882691264] DHCPSRV_PGSQL_GET_ADDR4 obtaining IPv4 lease for address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.alloc-engine/1541.140278882691264] ALLOC_ENGINE_V4_REQUEST_EXTEND_LEASE [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: extending lifetime of the lease for address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.dhcpsrv/1541.140278882691264] DHCPSRV_PGSQL_UPDATE_ADDR4 updating IPv4 lease for address 10.52.67.126
2022-03-07 01:48:13.031 ERROR [kea-dhcp4.alloc-engine/1541.140278882691264] ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: error during attempt to allocate an IPv4 address: unable to update lease for address 10.52.67.126 as it does not exist
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.bad-packets/1541.140278882691264] DHCP4_PACKET_NAK_0004 [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: failed to grant a lease, client sent ciaddr 0.0.0.0, requested-ip-address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.callouts/1541.140278882691264] HOOKS_CALLOUTS_BEGIN begin all callouts for hook leases4_committed