Description of problem: service dhcpd restart service dhcpd condrestart or update of dhcp package which runs "condrestart" all make dhcpd dead if it was running before. Version-Release number of selected component (if applicable): dhcp-3.0.5-36.fc7 initscripts-8.54-1 How reproducible: Always Steps to Reproduce: 1# cat > /etc/dhcpd.conf << EOF ddns-update-style none; subnet 127.0.0.0 netmask 255.0.0.0 { } EOF 2# echo DHCPDARGS=lo > /etc/sysconfig/dhcpd 3# service dhcpd start 4# service dhcpd status dhcpd (pid 10488) is running... 5# service dhcpd restart 6# service dhcpd status Actual results: dhcpd dead but pid file exists Expected results: dhcpd (pid 10688) is running... Additional info: A second "service dhcpd restart" starts daemon, a third kills it, fourth starts and so on. It looks like "service dhcpd restart" does basically: kill -TERM `cat /var/run/dhcpd.pid`; daemon dhcpd But this kill does not kill the service immediately and "daemon" checks if process mentioned in /var/run/dhcpd.pid exists and if it does exist then it returns doing nothing. So a quick and dirty workaround to this would be: kill -TERM `cat /var/run/dhcpd.pid`; sleep 1; daemon dhcpd But it'd also fail on a busy machine or when dhcpd is swapped out. I think it should do something like a squid is doing, like: timeout=0 while : ; do checkpid(`cat /var/run/dhcpd.pid`) || break if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then echo_failure echo return 1 fi sleep 1 && echo -n "." timeout=$((timeout+1)) done echo_success echo
Created attachment 157619 [details] A patch for "service restart" and display of "Starting/Shutting down dhcpd [OK]/[FAILED]" messages This patch: 1. removes "-TERM" option from "killproc" run, because "killproc" sends "TERM" by default, and this option turns off killproc "wait until it dies" functionality, effectively braking "restart" 2. adds "echo" in two places needed for correct display of messages: Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ]
I confirm this bug. My system uses dhcp-3.0.5-36.fc7 initscripts-8.54-1
Yesterday dhcp package was automatically updated on my Fedora 7 system and after that it was dead because of this bug! It caused that there was no DHCP server on local network and so no computer was working (I already know that a server on F7 was a stupid idea). This is a serious bug with trivial solution. Much more serious than - For init script functions, echo new line after OK or FAIL msg (bug #244956) which was a cause of previous errata. Please release an errata for this bug before releasing any other as updating triggers this bug.
[root@localhost ~]# yum update Loading "installonlyn" plugin Setting up Update Process fedora 100% |=========================| 2.1 kB 00:00 livna 100% |=========================| 2.1 kB 00:00 updates 100% |=========================| 1.9 kB 00:00 Resolving Dependencies --> Running transaction check ---> Package selinux-policy.noarch 0:2.6.4-25.fc7 set to be updated ---> Package jpackage-utils.noarch 0:1.7.3-1jpp.3.fc7 set to be updated ---> Package selinux-policy-targeted.noarch 0:2.6.4-25.fc7 set to be updated ---> Package dhclient.i386 12:3.0.5-37.fc7 set to be updated ---> Package libdhcp4client.i386 12:3.0.5-37.fc7 set to be updated Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Updating: dhclient i386 12:3.0.5-37.fc7 updates 276 k jpackage-utils noarch 1.7.3-1jpp.3.fc7 updates 61 k libdhcp4client i386 12:3.0.5-37.fc7 updates 247 k selinux-policy noarch 2.6.4-25.fc7 updates 376 k selinux-policy-targeted noarch 2.6.4-25.fc7 updates 1.0 M Transaction Summary ============================================================================= Install 0 Package(s) Update 5 Package(s) Remove 0 Package(s) Total download size: 1.9 M Is this ok [y/N]: y Downloading Packages: (1/5): libdhcp4client-3.0 100% |=========================| 247 kB 00:09 (2/5): dhclient-3.0.5-37. 100% |=========================| 276 kB 00:10 (3/5): selinux-policy-tar 100% |=========================| 1.0 MB 00:37 (4/5): jpackage-utils-1.7 100% |=========================| 61 kB 00:02 (5/5): selinux-policy-2.6 100% |=========================| 376 kB 00:14 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Updating : selinux-policy ####################### [ 1/10] Updating : jpackage-utils ####################### [ 2/10] Updating : selinux-policy-targeted ####################### [ 3/10] Updating : dhclient ####################### [ 4/10] Updating : libdhcp4client ####################### [ 5/10] Cleanup : selinux-policy ####################### [ 6/10] Cleanup : jpackage-utils ####################### [ 7/10] Cleanup : selinux-policy-targeted ####################### [ 8/10] Cleanup : dhclient ####################### [ 9/10] Cleanup : libdhcp4client ####################### [10/10] Updated: dhclient.i386 12:3.0.5-37.fc7 jpackage-utils.noarch 0:1.7.3-1jpp.3.fc7 libdhcp4client.i386 12:3.0.5-37.fc7 selinux-policy.noarch 0:2.6.4-25.fc7 selinux-policy-targeted.noarch 0:2.6.4-25.fc7 Complete! [root@localhost ~]# The above happened a minute ago and it has had zero effect I can see on my computer at this time. I still get email and can send out this note. Karl Larsen
(In reply to comment #4) > The above happened a minute ago and it has had zero effect I can see on my > computer at this time. I still get email and can send out this note. I can't tell if your report is positive or negative.
I'm sorry, I didn't understand the bug. I thought it was new with the latest updates but it happened around The comments with my latest update on July 9 2007 have no meaning. Karl
I looked at /var/log/ yum.log and found I had dhcpd updated on June 30, at 18:27. I then looked at messages in that same time period and found this: Jun 30 18:49:47 localhost yum : Updated: xorg-x11-drv-ati.i386 6.6.3-4.fc7 Jun 30 18:50:24 localhost dhcdbd: Started up. Jun 30 18:50:42 localhost ntpd[999]: ntpd exiting on signal 15 Ju So it appears my upgrade went with no problems of any sort. The problems the bug starter had are common problems when working with the devices at /etc/rc.d/init.d/ and I did nothing with dhcbd since tum updated it. So I must say there is no bug so far as I can determine. Karl Larsen
dhcp-3.0.5-38.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.