Created attachment 364226 [details] patch for ldap init script fixing missing -d option to killproc Description of problem: When running "service ldap stop", the init script calls killproc without the -d option, thus killproc does not wait more than the minimum time before killing the process. With a large ldap catalog, this is not enough, and db corruption may occur. Version-Release number of selected component (if applicable): openldap-servers-2.3.43-3.el5, and all earlier versions. How reproducible: Often with large datasets Steps to Reproduce: See the mail thread at http://www.openldap.org/lists/openldap-software/200910/msg00012.html Actual results: init script does not wait long enough for slapd shutdown. ldap db corruption may occur. Expected results: The init script should have a configurable timeout from sysconfig like the fedora init script has had since 2.4.11-3, and wait the configured time before killing slapd. Additional info: Fixing this is trivial. See attached diff. Btw, adding support for killproc's -p (pidfile) option would also a good thing, as this makes the system less prone to kill wrong processes. (But remember that killproc's -p option is not supported in rhel4 and earlier).
After some walk through bugzilla, I found another bug describing this solution, closing this one as duplicate. *** This bug has been marked as a duplicate of bug 452064 ***
Please keep me updated about the resolution through this bug, if possible, since I cannot access to the source for this duplication, #452064 (Access Denied. You are not authorized to access bug #452064.). TIA.
I'm hoping to get the bug approved for fix in RHEL 5.5. If it happens, updates will be available through RHN. For now, this is basically the patch I will be applying: --- ldap_real_orig/ldap.init 2008-04-03 08:43:46.000000000 +0100 +++ ldap/ldap.init 2008-04-03 08:37:30.000000000 +0100 @@ -180,7 +180,7 @@ function stop() { # Stop daemons. prog=`basename ${slapd}` echo -n $"Stopping $prog: " - killproc ${slapd} + killproc -d $STOP_DELAY ${slapd} RETVAL=$? echo if [ $RETVAL -eq 0 ]; then