Elektrine lite

← Feed

@laird@hachyderm.io

2026-07-24 03:02 UTC

The first of these is easy to fix, just add something like "reconnect-wait-time": 3000, "max-reconnect-tries": 3, to the `lease-database` block in `kea-dhcp4.conf`. That'll let it try reconnecting after a 3s delay, but it'll still exit if it fails 3x in a row. Getting systemd to restart it is at least a bit better documented.

Replies (2)

  • @laird@hachyderm.io 2026-07-24 03:12

    In any case, my general opinion of Kea from when I first set it up 3 or 4 years ago hasn't really changed at all. It's massively overengineered for what I need, but *still* isn't actually able to do what I want it to do without jumping through major hoops. Fortunately, most of the hoops that I had to jump through at the time have stayed jumped-through. Other than the static lease issue and the "oops, transient database issue so turning off DHCP" issue I can mostly just ignore it all. I define DHCP pools and static leases in Netbox, and then periodically extract those and write them into a git repo, which gets synced onto my DHCP servers. In theory, this means that if anything breaks it'll just stop updating and it's relatively easy to fix. In practice, it means that I can set up new static reservations by just reserving the IP address for it in Netbox (which is where I manage IPs anyway) and adding a MAC address to the IP via a custom field. Every IPv4 address that has a MAC listed gets added to Kea automatically within a few minutes. This is pretty much the absolute least amount of work needed to accomplish the goal. I just need to paste the MAC into the IP reservation.

    Open ##4052951

  • @swhobbit@hachyderm.io 2026-07-24 16:48

    @laird@hachyderm.io not everybody over specifies the Kea configuration. I do it all with flat files. I think my Raspberry Pi shipped with a "lease-database": of type "memfile". On my server, the leases go in an included flat file: (I mailed the Kea configuration file to you.) My DNS/DHCP post-edit-update Makefile (which generates the include file) also does a: systemctl restart kea-dhcp4-server.service Of course, this means that my DNS/DHCP Makefile, the generated include file, and the DHCP server all run on the same machine. I am not showing all work. For example the Makefile invokes a 642 Python line script that takes the simple flat file that I edit and generates the DNS zones files, IBM host files, UNIX host files, ssh config files and DHCP include files, but you're a bright guy.

    Open ##4316308