<div dir="ltr">Where would I find the documentation on what an abandoned lease should look like in the kea leases file?  Maybe I can make a better fix.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Feb 7, 2025 at 3:29 AM Darren Ankney <<a href="mailto:darren.ankney@gmail.com">darren.ankney@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi John,<br>
<br>
"May not work" was probably the wrong phrase.  It may not provide all<br>
necessary functionality might have been better.  The abandoned leases<br>
are because of DHCPDECLINE.  Kea has a similar concept.  I'm not sure<br>
exactly how those are recorded in the lease file by Kea.  If the team<br>
would want to save these when importing the leases, more work might be<br>
required, was what I really meant.<br>
<br>
Thank you,<br>
Darren Ankney<br>
<br>
On Thu, Feb 6, 2025 at 5:18 PM John Lind <<a href="mailto:steinhelten@gmail.com" target="_blank">steinhelten@gmail.com</a>> wrote:<br>
><br>
> Awesome!  Thank you so much!  I'm confused about it saying the patch "may not work" - it certainly worked in my test case, although perhaps it means "it may not work in all cases" which could certainly be true - but I don't think that the assumption that we should be able to discard any lease that lacks a "hardware ethernet" from isc dhcp is a bad starting point, because that's what it actually does.<br>
><br>
> On Thu, Feb 6, 2025 at 3:41 PM Darren Ankney <<a href="mailto:darren.ankney@gmail.com" target="_blank">darren.ankney@gmail.com</a>> wrote:<br>
>><br>
>> Hi John,<br>
>><br>
>> Someone has reported for you:<br>
>> <a href="https://gitlab.isc.org/isc-projects/keama/-/issues/70" rel="noreferrer" target="_blank">https://gitlab.isc.org/isc-projects/keama/-/issues/70</a><br>
>><br>
>> Have a great week!<br>
>><br>
>> Thank you,<br>
>> Darren Ankney<br>
>><br>
>> On Thu, Feb 6, 2025 at 2:55 PM John Lind <<a href="mailto:steinhelten@gmail.com" target="_blank">steinhelten@gmail.com</a>> wrote:<br>
>> ><br>
>> > Thanks, Darren.  I'm retired now, and don't really have a way to get another email address that wouldn't also be some sort of "public" server.  Also, I'm hoping that this is going to be a "one and done" for me - I don't expect to be a regular contributor, and won't meet the participation requirements of the site.<br>
>> ><br>
>> > I downloaded the file from the link you provided, and that's how I originally got it, and it's still identical to what I started with.<br>
>> ><br>
>> > I see that you are also using a "@<a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>" address, so perhaps you wouldn't be able to help me, either, but I'm hoping that SOMEONE on this list would pick up this literal 2-line mod and commit it to the project.  Perhaps they would need to create an issue first - I'm not quite sure what the work-flow is here.  The change definitely solves a real-world problem.<br>
>> ><br>
>> > On Thu, Feb 6, 2025 at 7:39 AM Darren Ankney <<a href="mailto:darren.ankney@gmail.com" target="_blank">darren.ankney@gmail.com</a>> wrote:<br>
>> >><br>
>> >> Hi John,<br>
>> >><br>
>> >> The latest version of this file should be here:<br>
>> >> <a href="https://gitlab.isc.org/isc-projects/keama/-/blob/master/leases/keama-leases.py" rel="noreferrer" target="_blank">https://gitlab.isc.org/isc-projects/keama/-/blob/master/leases/keama-leases.py</a><br>
>> >><br>
>> >> You can create an account on <a href="https://gitlab.isc.org/users/sign_up" rel="noreferrer" target="_blank">https://gitlab.isc.org/users/sign_up</a> but<br>
>> >> I think you can't use an @<a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a> address (or other public free<br>
>> >> email provider address) to do so (due to spam).<br>
>> >><br>
>> >> Once you've been able to create an account, it should be no problem<br>
>> >> for you to open an issue here:<br>
>> >> <a href="https://gitlab.isc.org/isc-projects/keama/-/issues" rel="noreferrer" target="_blank">https://gitlab.isc.org/isc-projects/keama/-/issues</a> where you can<br>
>> >> attach your patch in whatever way you see fit.  I don't think you'll<br>
>> >> be able to actually create a merge request though.<br>
>> >><br>
>> >> Thank you,<br>
>> >> Darren Ankney<br>
>> >><br>
>> >> On Mon, Feb 3, 2025 at 10:57 PM John Lind <<a href="mailto:steinhelten@gmail.com" target="_blank">steinhelten@gmail.com</a>> wrote:<br>
>> >> ><br>
>> >> > I managed to pull the script from the GIT repository.  It doesn't seem to be versioned, but I believe it is the latest and it says:<br>
>> >> ><br>
>> >> > # dhcp2kea by marmo<br>
>> >> > # 6-12-2022 (dhcpd4), 14-12-2022 (dhcpd6), 15-12-2022 (dhcp2kea.php)<br>
>> >> > # 23-12-2022 ("addr key=value" option)<br>
>> >> ><br>
>> >> > It seems to work great on my "leases" file, EXCEPT for the entries that are abandoned, e.g.<br>
>> >> > lease 192.168.1.43 {<br>
>> >> >         starts 0 2023/12/17 00:15:52 UTC;<br>
>> >> >         ends 2 2024/01/16 00:15:52 UTC;<br>
>> >> ><br>
>> >> >         abandoned;<br>
>> >> > }<br>
>> >> ><br>
>> >> > Then it says,<br>
>> >> ><br>
>> >> > root@remo:/home/john/xfer # python3 keama-leases.py dhcpd.leases<br>
>> >> > Traceback (most recent call last):<br>
>> >> >   File "/home/john/xfer/keama-leases.py", line 329, in <module><br>
>> >> >     print(leases,file=f)  # writing<br>
>> >> >     ^^^^^^^^^^^^^^^^^^^^<br>
>> >> >   File "/home/john/xfer/keama-leases.py", line 105, in __str__<br>
>> >> >     , v["hardware ethernet"] # hwaddr<br>
>> >> >       ~^^^^^^^^^^^^^^^^^^^^^<br>
>> >> > KeyError: 'hardware ethernet'<br>
>> >> ><br>
>> >> > This is not a show stopper for me, because I can just edit out those half-dozen or so entries and then it seems to work fine (though I haven't tried importing the .csv file into a mem file - not that far yet - or maybe this IS the format of the mem file?) but since this is a perfectly legitimate entry from isc-dhcpd, I'm wondering if a fix might not be in order?  I'm guessing that it should be fairly simple to test for the existence of that key and skip the entry, but I'm not a python person (perl rules!) so I don't feel fully confident in trying to fix this.  If I' the best available candidate, I'm willing to take a run at it.<br>
>> >> ><br>
>> >> > Actually, I did just take a swing at it.  It was easy.<br>
>> >> ><br>
>> >> > root@remo:/home/john/xfer # diff keama-leases.py keama-leases-fix.py<br>
>> >> > 96a97,98<br>
>> >> > >             if "hardware ethernet" not in v:<br>
>> >> > >                 continue<br>
>> >> ><br>
>> >> > Can someone help me commit this to git?<br>
>> >> ><br>
>> >> > --<br>
>> >> > John Lind<br>
>> >> > <a href="mailto:steinhelten@gmail.com" target="_blank">steinhelten@gmail.com</a><br>
>> >> ><br>
>> >> > --<br>
>> >> > ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
>> >> ><br>
>> >> > To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
>> >> ><br>
>> >> > Kea-users mailing list<br>
>> >> > <a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
>> >> > <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
>> >> --<br>
>> >> ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
>> >><br>
>> >> To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
>> >><br>
>> >> Kea-users mailing list<br>
>> >> <a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
>> >> <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
>> ><br>
>> > --<br>
>> > ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
>> ><br>
>> > To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
>> ><br>
>> > Kea-users mailing list<br>
>> > <a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
>> > <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
>> --<br>
>> ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
>><br>
>> To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
>><br>
>> Kea-users mailing list<br>
>> <a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
>> <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
><br>
> --<br>
> ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
><br>
> To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
><br>
> Kea-users mailing list<br>
> <a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
-- <br>
ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
<br>
Kea-users mailing list<br>
<a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</blockquote></div>