Bug 186984

Summary: Slapd doesnt start after FC4 -> FC5
Product: [Fedora] Fedora Reporter: Petr Krištof <petr>
Component: openldapAssignee: Jan Safranek <jsafrane>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: joni, redhat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openldap-2.3.30-2.fc5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-18 08:07:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150223    
Attachments:
Description Flags
ldap init script patch none

Description Petr Krištof 2006-03-27 20:13:37 UTC
Description of problem:
After the upgrade from FC-4 to FC-5 slapd doesnt starts.

Version-Release number of selected component (if applicable):
openldap-servers-2.3.19-4

How reproducible:
Everytime.

Steps to Reproduce:
1. Upgrade from FC-4 to FC-5
2. Update your /var/lib/ldap/ db files
3. Add DB_CONFIG and all needed tuning
4. Run service ldap start
  
Actual results:
[root@mr ldap]# service ldap start
Checking configuration files for slapd:  unable to open file
"/var/run/slapd.pid": 13 (Permission denied)
                                                           [FAILED]


Expected results:
Service should be started.

Additional info:
This looks like init script problem
As a temporary solution touch empty /var/run/slapd.pid
and chown it to ldap user before start of service.

Comment 1 Petr Krištof 2006-04-19 08:38:40 UTC
Created attachment 127976 [details]
ldap init script patch

Quick workaround.

Comment 2 Jonathan 2006-07-05 08:55:07 UTC
Same here with all FC5 machines, while FC4 machines work perfectly! The problem
seems to be that the ldap user may not write the pid to /var/run/slapd.pid
(because the /var/run dir is owned by root with chmod 755). 

The problem rises in the configtest function that is called by start on line 124:

if ! action $"Checking configuration files for $prog: " /sbin/runuser -m -s
"$slaptest" -- "$user" "$slaptestflags"; then

When I replace line number 124 of /etc/init.d/ldap by this (as in FC4):

if ! action $"Checking configuration files for $prog: " $slaptest
$slaptestflags; then

then it goes on and tells me that ldap starts succesfully, but in fact it does
not. However when I run '$ slapd' from the shell the in does start and works
just fine, I assume because I run it as root.

Thanks!
Jonathan

Comment 3 W. Michael Petullo 2006-09-03 20:52:52 UTC
This bug is also present in openldap-servers-2.3.27-2 from Rawhide.  Will this
be fixed before FC6?

Comment 4 Jay Fenlason 2006-09-05 18:52:18 UTC
In rawhide, the /etc/openldap/slapd.conf file puts the pid and args files in 
the new /var/run/openldap/ directory, which is 755 mode and owned by the ldap 
user.  If you are using an older slapd.conf file, you will need to manually 
merge the changes from /etc/openldap/slapd.conf.rpmnew into your slapd.conf 

Comment 5 W. Michael Petullo 2006-09-05 22:28:51 UTC
Thanks, Jay.

Comment 6 W. Michael Petullo 2006-09-05 22:59:13 UTC
Jay, I may have spoke too soon.  See
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=204593#c3.  It appears that
I jumped on the wrong bug.  Bug #204593 seems to match better and, luckily, I
found a solution to that one.

Comment 7 Jonathan 2006-09-06 08:17:01 UTC
@Jay: Thanks that works for me! :)

Comment 8 Fedora Update System 2007-04-27 05:50:41 UTC
openldap-2.3.30-2.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 9 Fedora Update System 2007-05-14 17:17:06 UTC
openldap-2.3.30-2.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.