Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1210842 - Add PIDFile option to systemd service file
Add PIDFile option to systemd service file
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
7.0
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Noriko Hosoi
Viktor Ashirov
:
: 1210853 (view as bug list)
Depends On: 1333198
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-10 13:01 EDT by Noriko Hosoi
Modified: 2016-11-03 16:35 EDT (History)
4 users (show)

See Also:
Fixed In Version: 389-ds-base-1.3.5.2-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 16:35:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2594 normal SHIPPED_LIVE Moderate: 389-ds-base security, bug fix, and enhancement update 2016-11-03 08:11:08 EDT

  None (edit)
Description Noriko Hosoi 2015-04-10 13:01:26 EDT
When stopping a dirsrv service, systemd currently guesses the PID to wait on. To make it explicit, a line like this should be added to `/usr/lib/systemd/system/dirsrv@.service`:
  PIDFile=/var/run/dirsrv/slapd-%i.pid
Comment 1 Viktor Ashirov 2015-04-20 17:01:01 EDT
*** Bug 1210853 has been marked as a duplicate of this bug. ***
Comment 6 Punit Kundal 2016-07-01 05:14:41 EDT
RHEL:
RHEL 7.3 x86_64

DS builds:
[root@ds ~]# rpm -qa | grep 389
389-ds-base-libs-1.3.5.10-1.el7.x86_64
389-ds-base-1.3.5.10-1.el7.x86_64
 
Steps performed
 
1. Created three standalone ds instances named 'ds', 'ds2' and 'ds3'
 
2. Verified whether the relevant pid files are created in /var/run/dirsrv directory
[root@ds ~]# ll /var/run/dirsrv/
total 24
-rw-r--r--. 1 dirsrv dirsrv    5 Jul  1 14:04 slapd-ds2.pid
-rw-r--r--. 1 dirsrv dirsrv 2088 Jul  1 14:04 slapd-ds2.stats
-rw-r--r--. 1 dirsrv dirsrv    6 Jul  1 14:10 slapd-ds3.pid
-rw-r--r--. 1 dirsrv dirsrv 2088 Jul  1 14:10 slapd-ds3.stats
-rw-r--r--. 1 dirsrv dirsrv    5 Jul  1 13:26 slapd-ds.pid
-rw-r--r--. 1 dirsrv dirsrv 2088 Jul  1 13:26 slapd-ds.stats
 
3. Checked the pid of all active instances with status-dirsrv
 
Instance slapd-ds
[root@ds ~]# status-dirsrv ds
● dirsrv@ds.service - 389 Directory Server ds.
   Loaded: loaded (/usr/lib/systemd/system/dirsrv@.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2016-07-01 14:22:26 IST; 3min 24s ago
 Main PID: 10875 (ns-slapd)
 
Verified pid for slapd-ds
[root@ds ~]# cat /var/run/dirsrv/slapd-ds.pid
10875
 
Instance slapd-ds2
[root@ds ~]# status-dirsrv ds2
● dirsrv@ds2.service - 389 Directory Server ds2.
   Loaded: loaded (/usr/lib/systemd/system/dirsrv@.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2016-07-01 14:22:27 IST; 4min 33s ago
 Main PID: 10973 (ns-slapd)
 
Verified pid for slapd-ds2
[root@ds ~]# cat /var/run/dirsrv/slapd-ds2.pid
10973
 
Instance slapd-ds3
[root@ds ~]# status-dirsrv ds3
● dirsrv@ds3.service - 389 Directory Server ds3.
   Loaded: loaded (/usr/lib/systemd/system/dirsrv@.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2016-07-01 14:22:27 IST; 5min ago
 Main PID: 11083 (ns-slapd)
 
Verified pid for slapd-ds3
[root@ds ~]# cat /var/run/dirsrv/slapd-ds3.pid
11083
 
As can be seen, all the pid's match
 
4. Stopped all the running instances
[root@ds ~]# stop-dirsrv
Stopping instance "ds"
Stopping instance "ds2"
Stopping instance "ds3"
 
5. Verified that no pid file is present in /var/run/dirsrv
[root@ds ~]# ll /var/run/dirsrv/
total 0
Comment 8 errata-xmlrpc 2016-11-03 16:35:05 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2594.html

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