Date: Tue, 6 Mar 2007 13:55:19 -0800 From: Christopher Cowart <ccowart@rescomp.berkeley.edu> To: freebsd-questions@freebsd.org Subject: isc-dhcpd logging breaks when syslog-ng HUP'd Message-ID: <20070306215519.GM21423@rescomp.berkeley.edu>
next in thread | raw e-mail | index | archive | help
--tuifNR376H9qoyoc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I have 2 servers running isc-dhcp3-server and syslog-ng. I have configured dhcpd to run in a chroot. The following (reproducible) sequence of events cause dhcpd logging to break: 1) Start syslog-ng 2) Start isc-dhcpd (At this point, logging is working fine) 3) `pkill -HUP syslog-ng` (This happens on the hour whenever logfiles need rotating, but can also be effected manually) 4) dhcpd logging is now broken 5) Restart isc-dhcpd (logging works again) My theory is that when isc-dhcpd starts, it gets an fd to the syslog socket. When syslog-ng receives a HUP, that socket is reopened and isc-dhcpd's fd is now broken. Relevant options from rc.conf: | syslogd_enable=3D"NO" | newsyslog_enable=3D"NO" | syslog_ng_enable=3D"YES" | dhcpd_enable=3D"YES" | dhcpd_flags=3D"-q" | dhcpd_conf=3D"/usr/local/etc/dhcpd.conf" | dhcpd_includedir=3D"/usr/local/etc/dhcpd.d" | dhcpd_withumask=3D"022" | dhcpd_chuser_enable=3D"YES" | dhcpd_withuser=3D"dhcpd" | dhcpd_withgroup=3D"dhcpd" | dhcpd_devfs_enable=3D"YES" | dhcpd_rootdir=3D"/var/jails/dhcpd" | dhcpd_chroot_enable=3D"YES" | dhcpd_ifaces=3D"bge0" My workaround: For the hosts in question, I've added to the logrotate postrotate script: `/usr/local/etc/rc.d/isc-dhcpd restart > /dev/null` This workaround makes me a little uncomfortable, because these instances of dhcpd are critical for thousands of end users. Is this a bug? Is there a better workaround? Logging from all other applications on the system is unaffected by the HUP to syslog-ng, including two jailed instances of bind9 (syslog-ng on the host opens up the socket /var/run/log inside those jails).=20 Any insight would be greatly appreciated. Thanks, --=20 Chris Cowart Lead Systems Administrator Network Infrastructure, RSSP-IT UC Berkeley --tuifNR376H9qoyoc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFF7eNHV3SOqjnqPh0RAuZEAJ9Jn/bEcLZMFgRuSdegBYbDXyf07gCfbfqD U6Uj47j+5YNZH50WWjmsSuQ= =pshw -----END PGP SIGNATURE----- --tuifNR376H9qoyoc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070306215519.GM21423>