RFE: dhcpd wrongly fails to start with a stale pid file
Will Murnane
will.murnane at gmail.com
Tue Jun 9 19:12:46 UTC 2009
On my solaris 10 box, dhcpd fails to start if a pid file exists, even
if the process listed in the pid file is not currently a dhcpd
process. This has not been an issue in the past, but we had a UPS
failure which caused the machine to shut down uncleanly. When the
machine came up, it had a pid file with "293" in it. A
non-dhcpd-related process 293 had started before dhcpd did. Then
dhcpd tried to start; the log shows:
[ Jun 9 13:11:03 Executing start method ("/usr/site/sbin/dhcpd -cf
/etc/dhcpd.conf -lf /var/dhcp/dhcpd.leases") ]
Internet Systems Consortium DHCP Server V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.
Listening on DLPI/bge0/00:1e:68:4a:21:e7/130.85.36.64/26
Sending on DLPI/bge0/00:1e:68:4a:21:e7/130.85.36.64/26
Sending on Socket/fallback/fallback-net
There's already a DHCP server running.
Process 293 does exist, but it's not a dhcpd. I suggest that dhcpd
should not only check for the existence of a process with the same
identifier, but check that the name of the process is different.
I'm in the process of upgrading to 4.1.0 to prevent this from
recurring, but I don't see anything in the changelog about changes
with regard to pid file handling.
Any suggestions are welcome. I can implement the "check if other
process has same name" code if it would be the correct approach, but I
can imagine other solutions are possible.
Will
More information about the dhcp-users
mailing list