Bug 812799 - systemd kill and isactive commands
systemd kill and isactive commands
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: arptables_jf (Show other bugs)
17
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jiri Popelka
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 816135
  Show dependency treegraph
 
Reported: 2012-04-16 05:27 EDT by Martin Cermak
Modified: 2012-05-17 11:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-17 11:30:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Cermak 2012-04-16 05:27:42 EDT
Description of problem:

After killing the service with "systemctl kill arptables_jf.service" the service is still active according to "systemctl status arptables_jf.service" and "systemctl is-active arptables_jf.service".

I think the kill command should either stop the service or report some non zero exitcode to indicate unsuccessful kill.

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

# rpm -q arptables_jf systemd
arptables_jf-0.0.8-24.fc17.x86_64
systemd-44-4.fc17.x86_64

How reproducible:

always


Steps to Reproduce:
1. systemctl start arptables_jf.service
2. systemctl kill arptables_jf.service
3. systemctl status arptables_jf.service
4. systemctl is-active arptables_jf.service
  
Actual results:

Kill exits with zero exitcode, but does nothing. After that status says the serice is active, but is-active says it is inactive.


Expected results:

1) both
     systemctl status arptables_jf.service
   and 
     systemctl is-active arptables_jf.service
   should report the same

2) kill should either 
     kill or stop the service and return zero exitcode
   or
     fail and return non-zero exitcode.
Comment 1 Jiri Popelka 2012-05-17 11:30:34 EDT
arptables_jf in rawhide now (bug #754423) provides native systemd unit file so I'll comment how that works.

(In reply to comment #0)
> Expected results:
> 1) both
>      systemctl status arptables_jf.service
>    and 
>      systemctl is-active arptables_jf.service
>    should report the same

This seems to be fixed with the rawhide version, i.e both command show that the service is active.
arptables.service contains RemainAfterExit=yes which means that the 
service shall be considered active even when all its processes exited.

> 2) kill should either 
>      kill or stop the service and return zero exitcode
>    or
>      fail and return non-zero exitcode.

According to systemctl(1) 'kill' sends a signal to one or more processes of the unit. But in case of "one-shot" service like arptables there's no process to send signal to. I'd say that returning zero exit-code is ok in this case, but that's question for systemd guys.

Anyway, I'm closing this BZ because (1) seems to be fixed in rawhide and (2) is ok in my opinion.

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