FS#61564 - [kea] Set correct PID directory for kea in its systemd service files
Attached to Project:
Community Packages
Opened by P. Shao (shallpion) - Tuesday, 29 January 2019, 05:56 GMT
Last edited by Baptiste (zorun) - Friday, 03 May 2019, 15:05 GMT
Opened by P. Shao (shallpion) - Tuesday, 29 January 2019, 05:56 GMT
Last edited by Baptiste (zorun) - Friday, 03 May 2019, 15:05 GMT
|
Details
Description:
According to the PKGBUILD of kea https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/kea#n52 kea was compiled in Arch Linux to place pid lock files under /var/kea, like /var/kea/kea-dhcp4.kea-dhcp4.pid. However these files are not cleaned up properly once the server was rebooted abruptly, like a power loss. In my case this caused kea-dhcp4 failed to start. Given the fact that admin user's PC are usually within the subnet served by this very dhcp server, such failure can cause a hard-to-address that admin has to manually set her PC's address to access the dhcp server, if no other physical connection is possible. I ended up writing my own script to clean these kea pid files on startup for a while until I digged deeper in the manual of Kea to figure out one can (and possibly should) address this by setting KEA_PIDFILE_DIR For example, this is what Arch does nowadays: [Service] ExecStart=/usr/bin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf And this is what Debian does: [Service] Environment="KEA_PIDFILE_DIR=/run/" Environment="KEA_LOCKFILE_DIR=/run/lock/kea/" Environment="KEA_LOGGER_DESTINATION=/var/log/kea/" RuntimeDirectory=lock/kea RuntimeDirectoryMode=0750 LogsDirectory=kea LogsDirectoryMode=0750 ExecStart=/usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf extracted from debian's source repo https://packages.debian.org/source/stable/isc-kea Ref: kea official doc: https://ftp.isc.org/isc/kea/1.5.0/doc/kea-guide.txt |
This task depends upon
Closed by Baptiste (zorun)
Friday, 03 May 2019, 15:05 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in kea 1.5.0-3
Friday, 03 May 2019, 15:05 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in kea 1.5.0-3
Comment by P. Shao (shallpion) -
Tuesday, 29 January 2019, 05:58 GMT
I forgot to emphasize that changing the localstatedir in the
configure option may be less ideal according to this discussion on
kea's mail list
http://kea-users.7364.n8.nabble.com/Kea-users-kea-pid-file-td971.html#a1012. Instead setting environment variables in systemd like Debian
did should be favored. Thanks.