Bug 1334094

Summary: keepalived does not stop after systemctl stop
Product: [Fedora] Fedora Reporter: Rolf Fokkens <rolf>
Component: keepalivedAssignee: Ryan O'Hara <rohara>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: athmanem, bperkins, mailinglists, matthias, rohara, rolf
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-03 13:45:30 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:
Attachments:
Description Flags
This service file seems to result in a reliable systemctl stop keepalived none

Description Rolf Fokkens 2016-05-08 10:22:30 UTC
Description of problem:
When doing "systemctl stop keepalived" there's a high probability that keepalived does not stop. This may relate to using vrrp_script.

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

How reproducible:
80-100%

Steps to Reproduce:
1. systemctl start keepalived
2. systemctl stop keepalived
3. Notice it's still running

Actual results:
Running keepalived

Expected results:
Stopped keepalived

Additional info:
Bug #1280437 relates to the same issue, but suggests an other solution. The solution here just makes systemd the parent of keepalived process, instead of tracking via a PID file.

Comment 1 Rolf Fokkens 2016-05-08 10:24:04 UTC
Created attachment 1155033 [details]
This service file seems to result in a reliable systemctl stop keepalived

Comment 2 mailinglists 2016-05-15 12:21:11 UTC
We also hit this bug.

Comment 3 Ryan O'Hara 2016-05-23 14:04:53 UTC
You hit this bug even with the fix from bz#1280437?

Comment 4 Ryan O'Hara 2016-05-23 14:31:31 UTC
(In reply to Rolf Fokkens from comment #0)
> Description of problem:
> When doing "systemctl stop keepalived" there's a high probability that
> keepalived does not stop. This may relate to using vrrp_script.
> 
> Version-Release number of selected component (if applicable):
> keepalived-1.2.19-2

Please update keepalived. The latest version in Fedora 23 in 1.2.20-1. The addition of PIDFile to the systemd unit file appeared in 1.2.19-3.

Comment 5 Rolf Fokkens 2016-05-23 16:29:14 UTC
The fix in bz#1280437 works as well. I found bz#1280437 after fixing it without the PID file, but I'm happy with bz#1280437 's solution as well.

It feels though that having the process write a PID file which will be used by systemd is somewhat indirect if systemd can know the PID directly if it is a child process. But that may be only about aesthetics, not really important.

Comment 6 Ryan O'Hara 2016-06-03 13:45:30 UTC

*** This bug has been marked as a duplicate of bug 1280437 ***