Bug 1356561

Summary: nslcd.service entering failed state when stopped via systemctl stop nslcd.service
Product: [Fedora] Fedora Reporter: Simon Reber <sreber>
Component: nss-pam-ldapdAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 25CC: jhrozek, lslebodn, nalin, stanislav.moravec
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: nss-pam-ldapd-0.8.14-8.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-08 09:13:27 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 Simon Reber 2016-07-14 11:38:19 UTC
Description of problem:

nslcd.service service is entering failed state when stopped via systemctl stop nslcd.service. This should not happen as it might impact alert reporting and surrounding tools.

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

 - nss-pam-ldapd-0.8.14-6.fc25.x86_64
 - 4.7.0-0.rc6.git2.2.fc25.x86_64
 - systemd-230-3.gitea68351.fc25.x86_64

How reproducible:

always

Steps to Reproduce:
1. dnf install nss-pam-ldapd-0.8.14-6.fc25.x86_64
2. systemctl start nslcd.service
3. systemctl status nslcd.service -> check that it's active
4. systemctl stop nslcd.service
5. systemctl status nslcd.service -> check state

Actual results:

[root@foobar system]# systemctl status nslcd.service
● nslcd.service - Naming services LDAP client daemon.
   Loaded: loaded (/usr/lib/systemd/system/nslcd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-07-14 13:30:12 CEST; 1s ago
  Process: 4694 ExecStart=/usr/sbin/nslcd (code=exited, status=0/SUCCESS)
 Main PID: 4695 (code=exited, status=1/FAILURE)

Jul 14 13:30:01 foobar nslcd[4695]: version 0.8.14 starting
Jul 14 13:30:01 foobar nslcd[4695]: accepting connections


Expected results:

[root@foobar system]# systemctl status rsyncd
● nslcd.service - Naming services LDAP client daemon.
   Loaded: loaded (/usr/lib/systemd/system/nslcd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Additional info:

Comment 1 Jan Kurik 2016-07-26 04:49:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 2 Stan Moravec 2017-02-06 12:28:32 UTC
Hello all,
I see the BZ is NEW since 2016, was there any progress or plan to address?

AFAICT this is result of nslcd main() returning failure at the very end:
https://github.com/arthurdejong/nss-pam-ldapd/blob/master/nslcd/nslcd.c#L897

Comment 3 Jakub Hrozek 2017-02-06 12:54:04 UTC
(In reply to Stan Moravec from comment #2)
> Hello all,
> I see the BZ is NEW since 2016, was there any progress or plan to address?
> 
> AFAICT this is result of nslcd main() returning failure at the very end:
> https://github.com/arthurdejong/nss-pam-ldapd/blob/master/nslcd/nslcd.c#L897

I'll gladly merge patches, but I don't plan on working on nss-pam-ldapd bugzillas myself.

Comment 4 Stan Moravec 2017-02-08 07:57:27 UTC
Pls find the fix in the upstream:
https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=53f797bf8a5433d68b21023fbd960ba79385be54

Comment 5 Jakub Hrozek 2017-02-08 09:13:27 UTC
Thanks, fixed in rawhide (I backported the patch, but since it was a one-liner, I hope I didn't make any mistakes)

Let me know if you'd like me to apply the patch to some other branch.