[Kea-users] kea pid file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] kea pid file

Jorell F
I compiled Kea from git master today, and now the PID files is created
in the root dir "/kea-dhcp4.kea-dhcp4.pid".

./configure --enable-generate-docs --with-mysql --with-pgsql
--enable-shell --localstatedir=/var/run/kea/


I first tried without localstatedir directive and that is when I noticed
where it was creating the PID file.


CentOS Linux release 7.5.1804 (Core)

Linux 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018
x86_64 x86_64 x86_64 GNU/Linux


# /usr/local/sbin/kea-dhcp4 -V
1.4.0-git
git e3f3adaf2e4d09c42a51675e324ba7be8adf9a41
linked with:
log4cplus 1.1.3
Botan 1.10.17 (released 20171002, revision
git:f7fe6beb5b3b6f944aa7bac491a3455e48ef6ebb, distribution unspecified)
database:
MySQL backend 7.0, library 10.1.36-MariaDB
PostgreSQL backend 5.0, library 90224
Memfile backend 2.1


# /usr/local/sbin/kea-dhcp4 -W

         Kea source configure results:
      -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Package:
    Name:              kea
    Version:           1.4.0-git
    Extended version:  1.4.0-git (git
e3f3adaf2e4d09c42a51675e324ba7be8adf9a41)
    OS Family:         Linux

    Hooks directory:   /usr/local/lib/hooks
    Premium hooks:     no

  C++ Compiler:
    CXX:             g++ --std=c++11
    CXX_VERSION:     g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
    CXX_STANDARD:    201103
    DEFS:            -DHAVE_CONFIG_H
    CPPFLAGS:         -DOS_LINUX  -DBOOST_ASIO_HEADER_ONLY
    CXXFLAGS:        -g -O2
    LDFLAGS:          -Wl,-R/usr/lib                -lpthread
    KEA_CXXFLAGS:     -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings
-Woverloaded-virtual -Wno-sign-compare -pthread
-Wno-missing-field-initializers -fPIC

  Python:
    PYTHON:          /bin/python
    PYTHON_VERSION:  2.7

  Boost:
    BOOST_VERSION:   1.59
    BOOST_INCLUDES:  -I/usr/local/include
    BOOST_LIBS:       -lboost_system

  Botan1:
    CRYPTO_VERSION:  1.10.17
    CRYPTO_CFLAGS:
    CRYPTO_INCLUDES: -I/usr/include/botan-1.10
    CRYPTO_LDFLAGS:   -L/usr/lib
    CRYPTO_LIBS:     -L/usr/lib -lbotan-1.10 -lbz2 -lcrypto -ldl
-lpthread -lrt -lz  -lbotan-1.10 -lbz2 -lcrypto -ldl -lpthread -lrt -lz

  OpenSSL: no

  Log4cplus:
    LOG4CPLUS_VERSION:  1.1.3
    LOG4CPLUS_INCLUDES: -I/usr/include
    LOG4CPLUS_LIBS:     -L/usr/lib -L/usr/lib64 -llog4cplus

  Flex/bison:
    FLEX:  flex
    BISON: bison -y

  MySQL:
    MYSQL_VERSION:   10.1.36
    MYSQL_CPPFLAGS:  -I/usr/include/mysql
    MYSQL_LIBS:      -L/usr/lib64  -lmysqlclient -lpthread -lz -lm -ldl
-lssl -lcrypto

  PostgreSQL:
    PGSQL_VERSION:   PostgreSQL 9.2.24
    PGSQL_CPPFLAGS:  -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include
-I/usr/include/pgsql/server
    PGSQL_LIBS:      -L/usr/lib64 -lpq

  Cassandra CQL:
    no

  Sysrepo:
    no

  Google Test:
    no

  Google Benchmark:
    no

  Developer:
    Enable Debugging:       no
    Google Tests:           no
    Valgrind:               not found
    C++ Code Coverage:      no
    Logger checks:          no
    Generate Documentation: yes
    Parser Generation:      no
    Kea-shell:              yes


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea pid file

Jorell F
I still do not understand why the PID file is created in the root of the
file system.

I even re-downloaded the gitlab repo

My previous build didn't have this problem, I don't remember what build
that was, I think it was 1.3.0-git

I had to add a line to the '[service]' section of my service file
"Environment=KEA_PIDFILE_DIR=/var/run/kea"

I did set '--localstatedir=/var/run" for ./configure
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea pid file

Wlodek Wencel
Thank you for reporting this, issue is now fixed on master branch.

Wlodek

QA Engineer, ISC


On 18/09/2018 20:45, Jorell F wrote:

> I still do not understand why the PID file is created in the root of the
> file system.
>
> I even re-downloaded the gitlab repo
>
> My previous build didn't have this problem, I don't remember what build
> that was, I think it was 1.3.0-git
>
> I had to add a line to the '[service]' section of my service file
> "Environment=KEA_PIDFILE_DIR=/var/run/kea"
>
> I did set '--localstatedir=/var/run" for ./configure
> _______________________________________________
> Kea-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea pid file

Jason Guy
Hi Jorell,

It is a bad idea to set the local state dir to:
--localstatedir=/var/run/kea/

When you reboot, the /var/run is recreated since it is a tempfs directory, and I found systemd will not recursively create the directories on start.
I had some of these same issues while working on the debian package, so I thought I would share. However, using /var/run for PID files is fine.

Cheers,
Jason






On Mon, Oct 15, 2018 at 4:36 AM Wlodek Wencel <[hidden email]> wrote:
Thank you for reporting this, issue is now fixed on master branch.

Wlodek

QA Engineer, ISC


On 18/09/2018 20:45, Jorell F wrote:
> I still do not understand why the PID file is created in the root of the
> file system.
>
> I even re-downloaded the gitlab repo
>
> My previous build didn't have this problem, I don't remember what build
> that was, I think it was 1.3.0-git
>
> I had to add a line to the '[service]' section of my service file
> "Environment=KEA_PIDFILE_DIR=/var/run/kea"
>
> I did set '--localstatedir=/var/run" for ./configure
> _______________________________________________
> Kea-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea pid file

Ricardo J. Barberis
As a workaround, kea 1.4 CentOS 7 rpm [1] creates this file:

[root@dhcpserver ~ ] # cat /lib/tmpfiles.d/kea.conf
# kea needs existing /run/kea/ to create logger_lockfile there
# See tmpfiles.d(5) for details

d /run/kea 0755 root root -


[1] https://github.com/RasmusEdgar/kea-centos-srpms

El Lunes 15/10/2018 a las 11:50, Jason Guy escribió:

> Hi Jorell,
>
> It is a bad idea to set the local state dir to:
> --localstatedir=*/var/run/kea/*
>
> When you reboot, the /var/run is recreated since it is a tempfs directory,
> and I found systemd will not recursively create the directories on start.
> I had some of these same issues while working on the debian package, so I
> thought I would share. However, using */var/run* for PID files is fine.
>
> Cheers,
> Jason
>
> On Mon, Oct 15, 2018 at 4:36 AM Wlodek Wencel <[hidden email]> wrote:
> > Thank you for reporting this, issue is now fixed on master branch.
> >
> > Wlodek
> >
> > QA Engineer, ISC
> >
> > On 18/09/2018 20:45, Jorell F wrote:
> > > I still do not understand why the PID file is created in the root of
> > > the file system.
> > >
> > > I even re-downloaded the gitlab repo
> > >
> > > My previous build didn't have this problem, I don't remember what build
> > > that was, I think it was 1.3.0-git
> > >
> > > I had to add a line to the '[service]' section of my service file
> > > "Environment=KEA_PIDFILE_DIR=/var/run/kea"
> > >
> > > I did set '--localstatedir=/var/run" for ./configure
> > > _______________________________________________
> > > Kea-users mailing list
> > > [hidden email]
> > > https://lists.isc.org/mailman/listinfo/kea-users
> >
> > _______________________________________________
> > Kea-users mailing list
> > [hidden email]
> > https://lists.isc.org/mailman/listinfo/kea-users



--
Ricardo J. Barberis
Usuario Linux Nº 250625: http://counter.li.org/
Usuario LFS Nº 5121: http://www.linuxfromscratch.org/
Senior SysAdmin / IT Architect - www.DonWeb.com
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users