KEA DHCP delete all reservations

Started by quantumjohnny, August 27, 2024, 01:50:24 PM

Previous topic - Next topic
August 27, 2024, 01:50:24 PM Last Edit: August 27, 2024, 02:18:18 PM by quantumjohnny
Hi,
How can I remove all the reservations from the KEA-DHCP(4) table? In the GUI I can delete individual entries but this is a lot of effort if you want to overhaul your whole subnet.
Deleting the reservation entries in /usr/local/etc/kea/kea-dhcp4.conf is being overwritten with the next restart of KEA.

Thanks for your help!

Hmm, there's a column with checkboxes on the left side, but there doesn't seem to be any way to delete all selected items. Clicking the bin/trashcan icon for any item asks for confirmation to "Remove selected item(s)?", but seems to only remove the one clicked on.

The only way I can see would be to backup your configuration, edit the XML, and restore from that.

I would greatly benefit from knowing the answer to this too.   I don't even have an option to delete individual leases in Kea DHCP->Leases DHCPv4 (i.e. no column with checkboxes and no bin/trashcan icon).  Am I missing something?

I am on 24.7.3_1

So this discussion is about deleting reservations, not leases. AFAIK there is no way to terminate/delete leases with Kea DHCP at the moment.

Quote from: dseven on September 12, 2024, 02:45:05 PM
So this discussion is about deleting reservations, not leases. AFAIK there is no way to terminate/delete leases with Kea DHCP at the moment.
Ah yes - you are right!  Apologies.

I would rather not try this as I have 30+ reservations

services > kea > reservations tab

change column view from 7 to all,  then top left to the left of subnet select all.   then click delete?

Kea is comparatively bare-bones at the moment, and doesn't have much in the way of controlling UI in the same way that ISC does. Probably fine until you have a problem, and then things become hard to resolve as compared to ISC.

At the moment, in my case, Kea seemed to get into some pathological situation where it'd hand out new leases to the same switch MAC address indefinitely, until they were completely used up. There's seemingly no way out of that situation in the present Kea UI, so I fell back to ISC, which seems fine.

Kea's been working well for months for me, unsure what's caused it to become insane now, but just FYI, at the moment, seems as if Kea can get you into trouble that you'll have a hard time getting out of, and staying with ISC might be the prudent choice.

Quote from: DEC670airp414user on September 15, 2024, 11:19:31 AM
I would rather not try this as I have 30+ reservations

services > kea > reservations tab

change column view from 7 to all,  then top left to the left of subnet select all.   then click delete?

By "column view", I assume you actually mean the "number of items per page" option?

Where is "delete"? There is a Delete button (bin / trash can icon) on each row of the table, but that only applies to that one row (I did test it). There does not appear to be any "delete selected" button.....?

Go to the far right on a row, right to the right of the `...` elipsis, click delete then confirm

Quote from: jmschu02 on September 27, 2024, 04:06:56 AM
Go to the far right on a row, right to the right of the `...` elipsis, click delete then confirm

If you mean the `...` that might appear at the end of the Description field if the value too long to fit in the column ... as I've said TWICE already, the Delete button for a row applies only to that row, not all selected rows (despite the wording of the confirmation prompt).