[Kea-users] Build results of kea 1.1.0-beta on OpenBSD

Patrik Lundin patrik at sigterm.se
Tue Oct 4 20:03:47 UTC 2016


On Tue, Oct 04, 2016 at 01:47:19PM +0200, Marcin Siodelski wrote:
> 
> Hi Patrik,
> 
> Many thanks for testing Kea on OpenBSD. I'll have a look at the PR which
> corrects the test behavior.
> 

Thanks for looking into the PR :).

> As for the syslog output, you're correct that the app name is generally
> used instead of the facility string. Note however that the logging
> messages themselves contain the application name, e.g. "kea-dhcp6.dhcp6"
> is a name of the logger which belongs to the "kea-dhcp6" application.
> 

I noticed this, but I feel it is pretty standard that the name of the program
is displayed after the hostname in general. It is nice to keep to a common
format when parsing syslog files with external tools.

> Nevertheless, I don't personally see an issue with changing the LOCAL0
> to app name. Can you file a Trac ticket for this?
> 

Sure, but before I do that I also want to add that I believe the syslog
code is a bit more broken than just the formatting. The manual
(https://ftp.isc.org/isc/kea/1.1.0/doc/kea-guide.html#logging-during-startup)
states that the format of syslog configuration is "syslog[:fac]", with
the following description:
===
The optional fac (which is separated from the word "syslog" by a colon)
specifies the facility to be used for the log messages. Unless specified,
messages will be logged using the facility "local0".
===

>From testing it seems to me the facility is not actually being configured,
and instead the messages are being sent to the USER facility no matter what is
entered (which appears to be the fallback facility of log4cplus).

This is tested by adding the following to syslog.conf:
===
user.*	/var/log/testuser
===

... and configuring kea.conf with plain "syslog", then adding
"KEA_LOGGER_DESTINATION=syslog:facilitytest" to keactrl.conf and finally
starting kea:
===
# cat /var/log/testuser
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp4.dhcp4] DHCP4_STARTING Kea DHCPv4 server version 1.1.0 starting
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp4.dhcpsrv] DHCPSRV_CFGMGR_SOCKET_TYPE_DEFAULT "dhcp-socket-type" not specified , using default socket type raw
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp4.dhcp4] DHCP4_CONFIG_COMPLETE DHCPv4 server has completed configuration: no IPv4 subnets!; DDNS: disabled
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp4.dhcpsrv] DHCPSRV_MEMFILE_DB opening memory file lease database: type=memfile universe=4
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp4.dhcpsrv] DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases from file /var/kea/kea-leases4.csv
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: WARN  [kea-dhcp4.dhcpsrv] DHCPSRV_NO_SOCKETS_OPEN no interface configured to listen to DHCP traffic
Oct  4 21:50:26 obsd-amd64-t02 LOCAL0: INFO  [kea-dhcp4.dhcp4] DHCP4_STARTED Kea DHCPv4 server version 1.1.0 started
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp6.dhcp6] DHCP6_STARTING Kea DHCPv6 server version 1.1.0 starting
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp6.dhcp6] DHCP6_CONFIG_COMPLETE DHCPv6 server has completed configuration: no IPv6 subnets!; DDNS: disabled
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp6.dhcpsrv] DHCPSRV_MEMFILE_DB opening memory file lease database: type=memfile universe=6
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp6.dhcpsrv] DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases from file /var/kea/kea-leases6.csv
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: INFO  [kea-dhcp6.dhcp6] DHCP6_USING_SERVERID server is using server-id 00:01:00:06:1f:86:bd:38:08:00:27:ed:35:a0 and stores in the file /var/kea/kea-dhcp6-serverid
Oct  4 21:50:26 obsd-amd64-t02 facilitytest: WARN  [kea-dhcp6.dhcpsrv] DHCPSRV_NO_SOCKETS_OPEN no interface configured to listen to DHCP traffic
Oct  4 21:50:26 obsd-amd64-t02 LOCAL0: INFO  [kea-dhcp6.dhcp6] DHCP6_STARTED Kea DHCPv6 server version 1.1.0 started
===

This results in two lines stating "LOCAL0" (result of "syslog" in kea.conf),
and "facilitytest" (the result of the keactrl.conf variable).

Note how both types of messages end up in the file above, based on the "user.*"
configuration.

Am I doing something wrong or is the code just broken currently?

-- 
Patrik Lundin



More information about the Kea-users mailing list