Bug 533491 - Confusing slapd init script error message
Summary: Confusing slapd init script error message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Zeleny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-06 21:21 UTC by Daniel Qarras
Modified: 2009-12-10 04:25 UTC (History)
2 users (show)

Fixed In Version: 2.4.19-1.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-10 04:25:19 UTC


Attachments (Terms of Use)
Patch adding detection if slapd is started (798 bytes, patch)
2009-11-10 09:09 UTC, Jan Zeleny
no flags Details | Diff

Description Daniel Qarras 2009-11-06 21:21:25 UTC
Description of problem:
Not sure is this is real problem or not but reporting anyway.

When starting (accidentally or scripted or for some other reason) slapd twice one gets a confusing error message:

root@localhost:~# /etc/init.d/slapd stop
Stopping slapd:                                            [  OK  ]
root@localhost:~# /etc/init.d/slapd start
Starting slapd:                                            [  OK  ]
root@localhost:~# /etc/init.d/slapd start
Starting slapd: ln: creating hard link `/var/run/slapd.pid': File exists

root@localhost:~# 

Perhaps stdout/stderr from ln could be redirected to /dev/null to avoid such a confusing message. Redirection could be done especially after bug 533157 has been fixed.

Thanks.

Version-Release number of selected component (if applicable):
F12B.

Comment 1 Tom "spot" Callaway 2009-11-08 23:02:25 UTC
Reassigning to openldap component.

Comment 2 Jan Zeleny 2009-11-09 08:03:44 UTC
I don't think this is the best option here. We should rather find out why there is pid file present if slapd isn't started. Could you give me some info regarding this?

Comment 3 Daniel Qarras 2009-11-09 10:34:42 UTC
As shown by the example, this happens only if the users (erroneously) start the slapd server twice in a row. Perhaps this just a luser error and as such there is no need for a change in the script.

Comment 4 Jan Zeleny 2009-11-10 09:09:57 UTC
Created attachment 368348 [details]
Patch adding detection if slapd is started

I think modification is in order here - when slapd is started, init script should detect it and don't try to start it again. I made a simple patch doing this. If it is acceptable solution, I'll commit the changes to CVS.

Comment 5 Daniel Qarras 2009-11-10 19:34:17 UTC
This seems to be a bit problematic:

root@localhost:~# rm -rf /etc/openldap/slapd.d/
root@localhost:~# /etc/init.d/slapd stop 
slapd (pid 2772) is running...
root@localhost:~# /etc/init.d/slapd start
find: `directory/': No such file or directory
Starting slapd: ln: creating hard link `/var/run/slapd.pid': File exists

root@localhost:~# killall slapd 
root@localhost:~# /etc/init.d/slapd stop 
Stopping slapd:                                            [FAILED]
root@localhost:~# /etc/init.d/slapd status
slapd is stopped
root@localhost:~# /etc/init.d/slapd start 
slapd is stopped
root@localhost:~#

Comment 6 Jan Zeleny 2009-11-11 08:06:16 UTC
Ok, first thing - I forgot to add > /dev/null to status calls, that's why "slapd is running" line is there.

Second - I don't get how it is possible that the ln error message persists. Could you run service slapd status and echo return code before starting slapd?

And the last thing - when killing slapd manually, service slapd stop isn't going to work and service slapd start as well. service slapd status should inform you about that by means of its return code, try to check it. If it detects incorrectly stopped slapd, it is up to system admin to fix the problem first and start slapd afterwards.

Comment 7 Bug Zapper 2009-11-16 15:15:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Daniel Qarras 2009-11-16 21:31:57 UTC
Please note that this was the error I was most worried:

root@localhost:~# /etc/init.d/slapd stop 
slapd (pid 2772) is running...

Comment 9 Jan Zeleny 2009-11-18 09:42:35 UTC
That's not an error, it's an output of status function, called to figure out if slapd is running. That output is now suppressed.

Comment 10 Fedora Update System 2009-11-19 08:10:34 UTC
openldap-2.4.19-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/openldap-2.4.19-1.fc12

Comment 11 Fedora Update System 2009-11-20 05:12:52 UTC
openldap-2.4.19-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update openldap'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-11725

Comment 12 Fedora Update System 2009-12-10 04:25:00 UTC
openldap-2.4.19-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.