Bug 1403959 - condrestart doesn't restart slapd
Summary: condrestart doesn't restart slapd
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openldap
Version: 6.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Matus Honek
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-12 17:25 UTC by Stefan Kremen
Modified: 2016-12-19 13:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-19 13:44:28 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Stefan Kremen 2016-12-12 17:25:58 UTC
Description of problem:
======================
Using "service slapd condrestart" restarts correctly when slapd is running:

# service slapd start
Starting slapd:                                            [  OK  ]

# service slapd condrestart
Stopping slapd:                                            [  OK  ]
Starting slapd:                                            [  OK  ]

# service slapd status
slapd (pid  2527) is running...

# echo $?
0


But condrestart doesn't restart slapd when it is stopped:

# service slapd stop
Stopping slapd:                                            [  OK  ]

# service slapd condrestart
# echo $?
0

# service slapd status
slapd is stopped
# echo $?
3

Version-Release number of selected component (if applicable):
============================================================
openldap-servers-2.4.40-16.el6

How reproducible:
================
always

Steps to Reproduce:
==================
1. service slapd stop
2. service slapd condrestart
3. service slapd status

Actual results:
==============
slapd is stopped

Expected results:
================
slapd is running

Additional info:
===============

Comment 1 Matus Honek 2016-12-19 09:42:50 UTC
Is not this the expected behaviour? I cannot find a manpage for sysV specifically but the systemd's equivalent should be the `try-restart` command of systemctl(1) (of course not to be found in RHEL-6) which has also an (undocumented?) `condrestart` option; quoting the manpage: Restart one or more units specified on the command line if the units are running. This does nothing if units are not running.

Comment 2 Stefan Kremen 2016-12-19 13:44:28 UTC
test case modified to expected behaviour and closing this ticket.


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