Bug 812815

Summary: kill command reports success even if it killed nothing
Product: [Fedora] Fedora Reporter: Martin Cermak <mcermak>
Component: systemdAssignee: Jan Synacek <jsynacek>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: azelinka, johannbg, jsynacek, mcermak, metherid, mschmidt, plautrba, rvokal, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-21 13:19:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Martin Cermak 2012-04-16 10:15:39 UTC
Description of problem:

  In some cases, the systemd kill command returns zero exitcode although
  it has no real effect. This happens usually with services that are not
  typical daemons. Example services: ebtables, iptables, arptables_jf.

  In fact there is nothing to kill in these cases. But I think the kill command
  should either stop given service and return zero exitcode in case of success, 
  or should do nothing and return some non-zero exitcode. 

  It would be also nice if the kill command provided at least some feedback
  about what it did.

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


Comment 1 Michal Schmidt 2012-04-16 11:16:47 UTC
Hm, yes, it seems reasonable to report "No process found" or similar when there's nothing to kill.

Comment 2 Martin Cermak 2013-08-02 12:55:27 UTC
Reproduced with systemd-204-8.fc19.x86_64. Moving to Rawhide.

Comment 3 Jan Synacek 2015-05-12 12:50:02 UTC
What exactly is your reproducer?

Comment 4 Martin Cermak 2015-05-13 12:10:22 UTC
(In reply to Jan Synacek from comment #3)
> What exactly is your reproducer?


fc20 x86_64 # systemctl status ebtables.service
ebtables.service - Ethernet Bridge Filtering tables
   Loaded: loaded (/usr/lib/systemd/system/ebtables.service; disabled)
   Active: inactive (dead)

May 13 14:07:45 dhcp-24-165.brq.redhat.com systemd[1]: Stopped Ethernet Bridge Filtering tables.
fc20 x86_64 # systemctl kill ebtables.service
fc20 x86_64 # # here I'd expect message like "nothing was killed in fact, dude".

Comment 5 Jan Kurik 2015-07-15 15:10:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:

Comment 6 Jan Synacek 2015-09-21 13:19:28 UTC
Implemented in https://github.com/systemd/systemd/pull/1311.

It is now possible to use 'systemctl --fail kill ...' to get an error when there was nothing to kill.