Possible bug in kea 1.5.0 - problems with paths for logger_lockfile and kea-dhcp{4,6}.log.lock
Most of my original bug report below is focusing on a non-problem, concerning the kea subdir, but as it still contains some valid questions I will leave it unedited. Please read my latest comment.
name: No longer possible to specify exact pid file dir about: a kea subdir is now always present
Describe the bug It does not seem possible to specify an exact pid file dir like /run or /var/run using the --localstatedir= option when running configure as described here: https://jenkins.isc.org/job/Kea_doc/guide/kea-guide.html#dhcp4-start-stop
If the localstatedir is set to i.e --localstatedir=/home/builder/test/run the resulting directory tree looks like this:
[builder@centbuild test]$ tree run/
run/
├── kea
│ ├── kea-dhcp6.kea-dhcp6.pid
│ ├── kea-dhcp6-serverid
│ └── kea-leases6.csv
├── log
└── run
└── kea
└── logger_lockfile
The kea subdir is not specified with the --localstatedir option, where does it come from and how to disable it?
And why is the extra run/kea/log subdirs created here? According to documentation the logger_lockfile
should be placed in /var/run/kea. The location seems to be determined by localstatedir, but again with the kea subdir seemingly hardcoded in.
On CentOS the problem manifests itself post installation when trying to start daemons and with the kea subdir not present. A possible workaround is to hardcode KEA_PIDFILE_DIR variable in to the systemd units, but as stated in the documentation, this primarily for testing purposes.
I ran the build both with and without autoreconf --verbose --force --install. The results are not exactly the same.
Building the source without autoreconf the subdir tree looked like this:
[builder@centbuild run]$ tree .
.
├── kea
│ ├── kea-dhcp6-serverid
│ └── kea-leases6.csv
├── log
│ ├── kea-dhcp6.log
│ └── kea-dhcp6.log.lock
└── run
└── kea
└── logger_lockfile
With log files now placed in log subdir inside localstatedir.
To Reproduce Steps to reproduce the behavior:
- ./configure --prefix=/home/builder/test --localstatedir=/home/builder/test/run --disable-dependency-tracking --disable-rpath --disable-silent-rules --disable-static --enable-debug --enable-shell --with-mysql --with-log4cplus --with-openssl --with-pgsql --with-gnu-ld && make && make install
- Post installation observe that pid file is created in /home/builder/test/run/kea subdir
- autoreconf --verbose --force --install && /configure --prefix=/home/builder/test --localstatedir=/home/builder/test/run --disable-dependency-tracking --disable-rpath --disable-silent-rules --disable-static --enable-debug --enable-shell --with-mysql --with-log4cplus --with-openssl --with-pgsql --with-gnu-ld && make && make install
- Post installation observe that pid file is created in /home/builder/test/run/kea subdir
The reason I include autoreconf is because configure.ac is patched for systemd support before compilation.
Expected behavior This is problematic when creating an rpm. I would expect it to be possible to set a specific pid file dir, lock file dir and log file dir pre compilation or documentation describing how to do properly. Or for the Kea build system to respect what autoreconf determines.
Environment:
- Kea version: 1.5.0
- OS: CentOS Linux release 7.5.1804 (Core)
- ./configure --prefix=/home/builder/test --localstatedir=/home/builder/test/run --disable-dependency-tracking --disable-rpath --disable-silent-rules --disable-static --enable-debug --enable-shell --with-mysql --with-log4cplus --with-openssl --with-pgsql --with-gnu-ld
Describe the solution you'd like Some behaviour concerning pid file changed from version 1.4.0-P1. I have looked at commits and I can not pin point the specific commit which changed the behaviour. I would like at least be able to determine exact pid file placement before compilation, that is without the extra kea subdir.