Red Hat Bugzilla – Bug 82181
Command "service named restart" doesn't work
Last modified: 2007-04-18 12:50:08 EDT
Description of problem:
The command "service named restart" does not always restart the DNS service.
The command "/etc/rc.d/init.d/named restart" seems to work.
This problem seems to occur only under heavy CPU load. The system reports that
BIND is already running, and it does not start the service. It seems that the
daemon can sometimes take longer than expected to terminate, and that this
confuses the script.
Editing the /etc/rc.d/init.d/named script, by adding a "sleep 2" command between
the stop and start calls in restart(), seems to fix the problem.
Version-Release number of selected component (if applicable):
Intermittent. Try it while compiling a kernel.
Steps to Reproduce:
1.Log in as root.
2.service named restart
3.If the above "fails to fail" try it under a heavy [CPU|Disk] load.
named stops and does not restart.
named should stop and then start up again.
Created attachment 89435 [details]
Fixed version of init script
In restart(), I added a 2 second delay between stop and start. Seems to work.
Fixed in Rawhide. I basically added your two second sleep on restart.
I've noticed similar issues with other init scripts too, e.g. network, squid.
The same fix appears to resolve them.