Hi Kraishak, I would suspect that you have a particularly chatty client that is constantly renewing the lease. I suspect that by the time you start the server and have a chance to perform the lease4-get-all that the client has already renewed the lease. You confirm this by having a look in the logs. Possibly, while testing, set the severity to DEBUG and debug level to 99.
lease4-get-all is getting the data from the kea-dhcp4 server, it has no where else to get it from. It has to be the data as the kea-dhcp4 server sees it. Thank you, Darren Ankney On Fri, Apr 21, 2023 at 11:05 AM Kraishak Mahtha <kraishak....@gmail.com> wrote: > > Hi All, > I am using the kea-HA in load balance mode, as part of testing I configured a > subnet and set the lease time to "86400", later as part of the change I > changed the scope rang and restarted kea-dhcp4(stopped and started) but still > the lease4-get-all command shows all the old lease as active. > Command I used to get lease : echo '{"command":"lease4-get-all"}' | > /usr/bin/socat - UNIX:/root/tmp/kea4-ctrl-socket > > I stopped kea-DHCP on both servers, deleted all the lease files(kea service > created two lease files with .2 extension remove that too), and then > recreated with empty, and then started one by one but still, the command > gives me the old leases data, Now I removed the HA config and made it > standalone, deleted all the lease files and recreated lease file with empty > data and started again but still, it shows the old lease entries as active. > > I tried adding the sanity check section too in the config, line > "lease-checks": "del" but it looks like it works at the subnet level, if I > remove the subnet then it is not showing the data, but when I add it back the > subnet with the different pool range still I can get the old lease data. > > I have two doubts > 1)Even after deleting the lease file and deleting the range from the config > file how can the server still have the lease information or from where does > it get the data, Can we reset it manually or do we have any approach that > needs to be followed for the server to auto figure out the lease entries are > not used as the range definition itself is removed from the config file. > > 2)lease4-get-all command is not giving the correct data, do we have any way > or any other command where we can get the current active leases without > having old ones? > > Thanks In Advance > Kraishak > > -- > ISC funds the development of this software with paid support subscriptions. > Contact us at https://www.isc.org/contact/ for more information. > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. > > Kea-users mailing list > Kea-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/kea-users -- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. Kea-users mailing list Kea-users@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users