Bug#910671: kea-dhcp4-server: Missing /var/kea and /var/run/kea
Hi Baptiste, Apologies for this, but I fixed this bug months ago. I am somewhat new at maintaining a package, and apparently I failed to do something to get the debian build system to pickup the changes for P1-4 and P1-5. I will figure out how to do this critical step, and make sure it gets pushed to Sid. I am starting to package 1.5, and wanted to make sure 1.4 was moved to testing but I have to first make sure it is actually pushed to Sid first. :( Thanks Jason On Fri, Nov 9, 2018 at 10:56 AM Jason Guy wrote: > Thanks for sharing Martin. In 1.3 I had all the directories defined > correctly, but we made a bunch of changes and I thought I fixed all of the > directories in 1.4, but you are correct, the localstatedir SHOULD be > /var/lib/kea, which should be created during the install. I will take a > look over the weekend, and fix this. > > Cheers, > Jason > > On Wed, Nov 7, 2018 at 10:30 AM Martin Weinelt > wrote: > >> I temporarily fixed this using systemd-tmpfiles: >> >> # cat /etc/tmpfiles.d/kea.conf >> #Type Path Mode UID GID Age Argument >> d /run/kea 0755 root root - - >> >> # systemd-tmpfiles --create >> >> Instead of using /var/kea I used /var/lib/kea which existed from before >> the upgrade. >> >> Set a "name", actually a path, for your lease-database: >> >> "lease-database": { >> // Memfile is the simplest and easiest backend to use. It's a >> in-memory >> // C++ database that stores its state in CSV file. >> "type": "memfile", >> "lfc-interval": 3600, >> "name": "/var/lib/kea/dhcp4.leases" >> }, >> >> >> Best regards >> >> Martin >> >>
Bug#910671: kea-dhcp4-server: Missing /var/kea and /var/run/kea
Thanks for sharing Martin. In 1.3 I had all the directories defined correctly, but we made a bunch of changes and I thought I fixed all of the directories in 1.4, but you are correct, the localstatedir SHOULD be /var/lib/kea, which should be created during the install. I will take a look over the weekend, and fix this. Cheers, Jason On Wed, Nov 7, 2018 at 10:30 AM Martin Weinelt wrote: > I temporarily fixed this using systemd-tmpfiles: > > # cat /etc/tmpfiles.d/kea.conf > #Type Path Mode UID GID Age Argument > d /run/kea 0755 root root - - > > # systemd-tmpfiles --create > > Instead of using /var/kea I used /var/lib/kea which existed from before > the upgrade. > > Set a "name", actually a path, for your lease-database: > > "lease-database": { > // Memfile is the simplest and easiest backend to use. It's a > in-memory > // C++ database that stores its state in CSV file. > "type": "memfile", > "lfc-interval": 3600, > "name": "/var/lib/kea/dhcp4.leases" > }, > > > Best regards > > Martin > >
Bug#910671: kea-dhcp4-server: Missing /var/kea and /var/run/kea
I temporarily fixed this using systemd-tmpfiles: # cat /etc/tmpfiles.d/kea.conf #Type Path Mode UID GID Age Argument d /run/kea 0755 root root - - # systemd-tmpfiles --create Instead of using /var/kea I used /var/lib/kea which existed from before the upgrade. Set a "name", actually a path, for your lease-database: "lease-database": { // Memfile is the simplest and easiest backend to use. It's a in-memory // C++ database that stores its state in CSV file. "type": "memfile", "lfc-interval": 3600, "name": "/var/lib/kea/dhcp4.leases" }, Best regards Martin
Bug#910671: kea-dhcp4-server: Missing /var/kea and /var/run/kea
Package: kea-dhcp4-server Version: 1.4.0.P1-3 Severity: normal Dear Maintainer, *** Reporter, please consider answering these questions, where appropriate *** * What led up to the situation? After installing kea-dhcp4-server via "apt install -y kea-dhcp4-server", launching kea-dhcp4-server via systemctl makes it crash : the critical part is that it cannot put its leases in /var/kea since the directory does not exist. The other part (whose error message hides the critical error above) is that it cannot get a handle on the interprocess sync lockfile, since the directory which it tries to initialize it in, /var/run/kea does not exist. * What exactly did you do (or not do) that was effective (or ineffective)? ~# mkdir /var/kea Allows kea to start, displaying messages about the interprocess lockfile. ~# mkdir /var/run/kea Allows kea to use the interprocess lockfile (but without the other directory kea crashes). * What outcome did you expect instead? Installing kea-dhcp4-server and it being able to start with the default configuration. * Traces of the execution ~# systemctl start kea-dhcp4-server && journalctl -xe Oct 09 16:39:22 sidtesting systemd[1]: Started ISC KEA IPv4 DHCP daemon. -- Subject: Unit kea-dhcp4-server.service has finished start-up -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Unit kea-dhcp4-server.service has finished starting up. -- -- The start-up result is RESULT. Oct 09 16:39:22 sidtesting kea-dhcp4[14073]: 2018-10-09 16:39:22.339 ERROR [kea-dhcp4.dhcp4/14073] DHCP4_CONFIG_LOAD_FAIL configuration Oct 09 16:39:22 sidtesting kea-dhcp4[14073]: 2018-10-09 16:39:22.339 ERROR [kea-dhcp4.dhcp4/14073] DHCP4_INIT_FAIL failed to initialize Oct 09 16:39:22 sidtesting systemd[1]: kea-dhcp4-server.service: Main process exited, code=exited, status=1/FAILURE Oct 09 16:39:22 sidtesting systemd[1]: kea-dhcp4-server.service: Failed with result 'exit-code'. ~# /usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf Unable to use interprocess sync lockfile (No such file or directory): /var/run/kea/isc_kea_logger_lockfile Unable to use interprocess sync lockfile (No such file or directory): /var/run/kea/isc_kea_logger_lockfile Unable to use interprocess sync lockfile (No such file or directory): /var/run/kea/isc_kea_logger_lockfile ~# mkdir /var/run/kea ~# /usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf -d 2018-10-09 16:40:45.435 DEBUG [kea-dhcp4.dhcp4/14099] DHCP4_START_INFO pid: 14099, port: 67, verbose: yes 2018-10-09 16:40:45.435 INFO [kea-dhcp4.dhcp4/14099] DHCP4_STARTING Kea DHCPv4 server version 1.4.0-P1 starting 2018-10-09 16:40:45.435 DEBUG [kea-dhcp4.dhcp4/14099] DHCP4_OPEN_SOCKET opening sockets on port 67 ... 2018-10-09 16:40:45.437 ERROR [kea-dhcp4.dhcp4/14099] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /etc/kea/kea-dhcp4.conf, reason: Unable to open database: unable to open '/var/kea/kea-leases4.csv' 2018-10-09 16:40:45.438 ERROR [kea-dhcp4.dhcp4/14099] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/etc/kea/kea-dhcp4.conf': Unable to open database: unable to open '/var/kea/kea-leases4.csv' ~# mkdir /var/kea ~# systemctl start kea-dhcp4-server ~# systemctl status kea-dhcp4-server ● kea-dhcp4-server.service - ISC KEA IPv4 DHCP daemon Loaded: loaded (/lib/systemd/system/kea-dhcp4-server.service; disabled; vendor preset: enabled) Active: active (running) since Tue 2018-10-09 16:41:31 CEST; 5s ago Docs: man:kea-dhcp4(8) Main PID: 14166 (kea-dhcp4) Tasks: 1 (limit: 4706) Memory: 2.1M CGroup: /system.slice/kea-dhcp4-server.service └─14166 /usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf Oct 09 16:41:31 sidtesting systemd[1]: Started ISC KEA IPv4 DHCP daemon. -- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.18.0-2-amd64 (SMP w/3 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages kea-dhcp4-server depends on: ii kea-common 1.4.0.P1-3 ii libboost-system1.62.0 1.62.0+dfsg-10 ii libc6 2.27-6 ii libgcc11:8.2.0-7 ii libstdc++6 8.2.0-7 ii lsb-base 9.20170808 kea-dhcp4-server recommends no packages. Versions of packages kea-dhcp4-server suggests: pn kea-doc -- no debconf information