Kea 1.8.2 Fails to Allocate Leases After Upgrade from 1.6.3
Describe the bug My setup is using PostgreSQL as a backend for the lease and host reservations database. On 1.8.2, every time a client requests a lease, the following error message is output in the log (I replaced MACs and IPs with "x"):
2021-03-01 22:26:55.261 ERROR [kea-dhcp4.alloc-engine/1808.1973680816] ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 xx:xx:xx:xx:xx:xx], cid=[no info], tid=0x12233456: error during attempt to allocate an IPv4 address: unable to update lease for address x.x.x.x as it does not exist
I noticed that if I go into the kea lease database using pgAdmin and manually delete the row in the lease4 table for an affected client, the client then obtains a lease and a new row is created in the table. However, it eventually loses the lease again and can't get it back until the row is deleted again.
To Reproduce I'm unsure what to place here as this simply occurred immediately after upgrading from 1.6.3 to 1.8.2. I have tried the upgrade twice with the same result.
Expected behavior As with previous upgrades (1.4.0 -> 1.5.0 -> 1.6.3) I'd expect the Kea DHCPv4 server to continue to allocate leases as expected.
Environment:
- Kea version: 1.8.2 tarball linked with: log4cplus 1.1.2 OpenSSL 1.1.0l 10 Sep 2019 database: PostgreSQL backend (9.6.20)
- OS: Raspberry Pi OS (Stretch: 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux)
- Which features were compiled in: configure --with-pgsql --enable-shell
- If/which hooks where loaded in: None
Additional Information Config:
{ "Dhcp4": { "interfaces-config": { "interfaces": [ "eth0" ] }, "control-socket": { "socket-type": "unix", "socket-name": "/tmp/kea-dhcp4-ctrl.sock" }, "lease-database": { "type": "postgresql", "name": "kea_lease", "user": "****", "password": "****", "host": "localhost", "port": 5432 }, "hosts-database": { "type": "postgresql", "name": "kea_lease", "user": "****", "password": "****", "host": "localhost", "port": 5432 }, "expired-leases-processing": { "reclaim-timer-wait-time": 10, "flush-reclaimed-timer-wait-time": 25, "hold-reclaimed-time": 3600, "max-reclaim-leases": 100, "max-reclaim-time": 250, "unwarned-reclaim-cycles": 5 }, "renew-timer": 900, "rebind-timer": 1800, "valid-lifetime": 3600, "option-data": [ { "name": "domain-name", "code": 15, "data": "abc.com" }, { "name": "domain-name-servers", "code": 6, "data": "10.2.0.1" }, { "name": "ntp-servers", "code": 42, "data": "10.2.0.1" } ], "host-reservation-identifiers": [ "hw-address" ], "shared-networks": [ { "name": "Home", "subnet4": [ { "user-context": { "comment": "Networking Devices" }, "subnet": "10.2.0.0/24", "id": 1, "reservation-mode": "out-of-pool", "option-data": [ { "name": "routers", "code": 3, "data": "10.2.0.1" } ] }, { "user-context": { "comment": "Host Management" }, "subnet": "10.2.1.0/24", "id": 2, "reservation-mode": "out-of-pool", "option-data": [ { "name": "routers", "code": 3, "data": "10.2.1.1" } ] }, { "user-context": { "comment": "Non-Domain Servers" }, "subnet": "10.2.3.0/24", "id": 4, "reservation-mode": "out-of-pool", "option-data": [ { "name": "routers", "code": 3, "data": "10.2.3.1" } ] }, { "user-context": { "comment": "Known Clients" }, "subnet": "10.2.4.0/24", "id": 5, "reservation-mode": "out-of-pool", "option-data": [ { "name": "routers", "code": 3, "data": "10.2.4.1" }, { "name": "domain-name-servers", "code": 6, "data": "10.2.0.251", "always-send": true } ] }, { "user-context": { "comment": "Unknown Clients" }, "subnet": "10.2.5.0/24", "id": 6, "reservation-mode": "disabled", "client-class": "UNKNOWN", "pools": [ { "pool": "10.2.5.2 - 10.2.5.254" } ], "option-data": [ { "name": "routers", "code": 3, "data": "10.2.5.1" } ] }, { "user-context": { "comment": "General Devices" }, "subnet": "10.2.6.0/24", "id": 7, "reservation-mode": "out-of-pool", "option-data": [ { "name": "routers", "code": 3, "data": "10.2.6.1" } ] }, { "user-context": { "comment": "Media Devices" }, "subnet": "10.2.7.0/24", "id": 8, "reservation-mode": "out-of-pool", "option-data": [ { "name": "routers", "code": 3, "data": "10.2.7.1" } ] } ] } ], "loggers": [ { "name": "kea-dhcp4", "output_options": [ { "output": "/usr/local/var/log/kea-dhcp4.log" } ], "severity": "INFO", "debuglevel": 0 } ] } }
Contacting you How can ISC reach you to discuss this matter further? If you do not specify any means such as e-mail, jabber id or a telephone, we may send you a message on github with questions when we have them.
Please contact me via my Gitlab profile.