Bug 1128259

Summary: nscd systemd unit file looks not properly setting the pidfile
Product: Red Hat Enterprise Linux 7 Reporter: Mattieu Puel <mattieu.puel>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: lnykryn, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-11 07:54:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mattieu Puel 2014-08-08 17:39:57 UTC
Description of problem:

When activated, nscd is not started properly by systemd.                                                                                                                           
It looks like the configured pidfile in the systemd unit does not match                                                                                                                         
the actual one :                                                                                                                                                                                
                                                                                                                                                                                                
$ grep PID /usr/lib/systemd/system/nscd.service                                                                                                                                                 
PIDFile=/run/nscd/nscd.pid                                                                                                                                                                      
                                                                                                                                                                                                
while the file is written in /var/run/nscd/nscd.pid by the daemon.                                                                                                                              
Systemd is then stuck on his waiting for the pid file creation.     

Version-Release number of selected component (if applicable):
nscd-2.17-55

How reproducible:
Always.

Steps to Reproduce:
1. systemctl start nscd

Actual results:

systemd[1]: Starting Name Service Cache Daemon...
systemd[1]: PID file /run/nscd/nscd.pid not readable (yet?) after start.
systemd[1]: nscd.service operation timed out. Terminating.
systemd[1]: Failed to start Name Service Cache Daemon.



Expected results:
systemd[1]: Started Name Service Cache Daemon.



Additional info:
Modifying the unit file resolves the issue :
$ sed -i 's@PIDFile=/run/nscd/nscd.pid@PIDFile/var/run/nscd/nscd.pid@'  /usr/lib/systemd/system/nscd.service

Comment 2 Lukáš Nykrýn 2014-08-11 07:18:10 UTC
This is weird, /var/run should be a symlink to /run.
Also you have a typo in your sed expression, there is '=' missing in the second part.

But I have tried nscd on my rhel7 and it simply works out of box.

Comment 3 Mattieu Puel 2014-08-11 07:43:41 UTC
You are right, the problem is my side with a non-existent symlink. I focused on the content of the package. Sorry for your time.