Calling restart on init script does not restart daemon

Bug #1097523 reported by Tom Grace
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
389-ds-base (Ubuntu)
Fix Released
Undecided
Timo Aaltonen
Precise
Fix Released
Medium
Unassigned

Bug Description

[Impact]

restarting the daemon instance doesn't always work properly

[Test Case]

configure an instance, try restarting it

[Regression Potential]

low, it's verified to work on a later release

--

When calling /etc/init.d/dirsrv restart the daemon doesn't fully shutdown after stop before start is called. The effect of this is that the service will stop if started and vice-versa. Adding a sleep between stop and start seems to fix this issue, though is probably not the right answer. The init script in RHEL/CentOS appears to work correctly, and is attached in case it is helpful.

root@server:~# /etc/init.d/dirsrv restart
 * Starting 389 DS instance core1: ... [ OK ]
root@server:~# [08/Jan/2013:19:56:24 +0000] - 389-Directory/1.2.11.7 B2013.04.31 starting up
[08/Jan/2013:19:56:24 +0000] - slapd started. Listening on All Interfaces port 389 for LDAP requests

root@server:~# /etc/init.d/dirsrv restart
 * Shutting down 389 DS instance core1: ... [ OK ]
 * Starting 389 DS instance core1: ... [ OK ]
root@server:~# [08/Jan/2013:19:56:28 +0000] createprlistensockets - PR_Bind() on All Interfaces port 389 failed: Netscape Portable Runtime error -5982 (Local Network address is in use.)
[08/Jan/2013:19:56:27 +0000] - slapd shutting down - signaling operation threads
[08/Jan/2013:19:56:27 +0000] - slapd shutting down - waiting for 2 threads to terminate
[08/Jan/2013:19:56:27 +0000] - slapd shutting down - closing down internal subsystems and plugins
[08/Jan/2013:19:56:27 +0000] - Waiting for 4 database threads to stop
[08/Jan/2013:19:56:27 +0000] - All database threads now stopped
[08/Jan/2013:19:56:27 +0000] - slapd stopped.

Revision history for this message
Tom Grace (tom-deathbycomputers) wrote :
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I believe this is fixed in a later release,

Changed in 389-ds-base (Ubuntu):
status: New → Incomplete
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

could you try the attached initscript, move it as /etc/init.d/dirsrv

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

it's working for me on raring, which has the new script

Changed in 389-ds-base (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

verified the fix is correct, so closing for raring

Changed in 389-ds-base (Ubuntu):
status: Incomplete → Fix Released
description: updated
Changed in 389-ds-base (Ubuntu Precise):
status: New → In Progress
Timo Aaltonen (tjaalton)
Changed in 389-ds-base (Ubuntu Precise):
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Tom, or anyone else affected,

Accepted 389-ds-base into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/389-ds-base/1.2.10.4-0ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in 389-ds-base (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Tom Grace (tom-deathbycomputers) wrote :

I tested this using https://launchpad.net/ubuntu/+source/389-ds-base/1.2.10.4-0ubuntu3.1/+build/4334716 and it appears to work correctly. Test was: running the following for 5 mins without error:
while true; do /etc/init.d/dirsrv restart ; sleep 1 ; ps -ef | grep dir || break; done

Timo Aaltonen (tjaalton)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package 389-ds-base - 1.2.10.4-0ubuntu3.1

---------------
389-ds-base (1.2.10.4-0ubuntu3.1) precise; urgency=low

  * 389-ds-base.config: Removed, there is no debconf template.
    (LP: #1022718)
  * dirsrv.init: Fix stop() to remove the pidfile only when the process
    is finished. (LP: #1097523)
 -- Timo Aaltonen <email address hidden> Sat, 09 Feb 2013 00:02:58 +0200

Changed in 389-ds-base (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.