Bug 1033042

Summary: "systemctl stop <service>" doesn't kill services started from cmdline.
Product: Red Hat Enterprise Linux 7 Reporter: Kaushik Banerjee <kbanerje>
Component: doc-System_Administrators_GuideAssignee: Jaromir Hradilek <jhradile>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jhradile, lnykryn, systemd-maint-list
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-11 14:25:47 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:
Bug Depends On:    
Bug Blocks: 1052221    

Description Kaushik Banerjee 2013-11-21 13:16:04 UTC
Description of problem:
systemctl stop <service> doesn't kill daemons started from cmdline.

This is probably a feature in systemd. Logging this as a bug to see if this can be documented, since this is a change in behaviour from RHEL6.

Version-Release number of selected component (if applicable):
systemd-207-2.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. sssd -d 9 -f -c /tmp/sssd.conf

2. # systemctl stop sssd.service
# ps ax | grep sssd
18140 ?        Ss     0:00 sssd -d 9 -f -c /tmp/sssd.conf
18141 ?        S      0:00 /usr/libexec/sssd/sssd_be --domain LDAPTEST -d 0x77f0 --debug-to-files
18142 ?        S      0:00 /usr/libexec/sssd/sssd_nss -d 0x77f0 --debug-to-files
18143 ?        S      0:00 /usr/libexec/sssd/sssd_pam -d 0x77f0 --debug-to-files

3. # systemctl restart sssd.service
# ps ax | grep sssd
18140 ?        Ss     0:00 sssd -d 9 -f -c /tmp/sssd.conf
18141 ?        S      0:00 /usr/libexec/sssd/sssd_be --domain LDAPTEST -d 0x77f0 --debug-to-files
18142 ?        S      0:00 /usr/libexec/sssd/sssd_nss -d 0x77f0 --debug-to-files
18143 ?        S      0:00 /usr/libexec/sssd/sssd_pam -d 0x77f0 --debug-to-files
18333 ?        Ss     0:00 /usr/sbin/sssd -D -f
18334 ?        S      0:00 /usr/libexec/sssd/sssd_be --domain LDAPTEST --debug-to-files
18335 ?        S      0:00 /usr/libexec/sssd/sssd_nss --debug-to-files
18336 ?        S      0:00 /usr/libexec/sssd/sssd_pam --debug-to-files

Actual results:


Expected results:


Additional info:

Comment 2 Michal Schmidt 2013-11-21 13:41:46 UTC
Daemons forked off from a user's shell (and hence running in the user's session cgroup) are not "services" as such. See also bug 1021565, bug 990039.

Comment 3 Lukáš Nykrýn 2013-11-25 12:29:49 UTC
Maybe this could be mentioned in documentation in differences between service in rhel6 and systemctl in rhel7. (But please note that service in rhel7 is just calling systemctl)

Comment 5 Jaromir Hradilek 2013-11-28 15:23:13 UTC
Thank you, I will document this in the chapter about systemd.