Bug 769726

Summary: keepalived systemd service file problems
Product: [Fedora] Fedora Reporter: Phil Oester <kernel>
Component: keepalivedAssignee: Ryan O'Hara <rohara>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: matthias, rohara
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-04 16:30:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Phil Oester 2011-12-21 22:32:36 UTC
keepalived systemd service file has multiple problems

1) Missing reload option
Reloading keepalived is useful in cases where you want to remove
a VRRP IP, or add a new VRRP IP without removing existing IPs.

This should be added to keepalived.service:

    ExecReload=/bin/kill -1 $MAINPID

2) Stop does not always remove VRRP IPs
By default, keepalived running in VRRP mode starts 2 processes.
When systemd uses its default stop method (cgroup), it kills
both of these processes, and this does not allow keepalived to
perform any required cleanup (such as removing VRRP IPs).  On stop,
only the main process should receive a kill signal

This should be added to keepalived.service:

    KillMode=process


Version-Release number of selected component (if applicable):
keepalived-1.2.2-3.fc16

Comment 1 Ryan O'Hara 2012-08-20 22:26:55 UTC
(In reply to comment #0)
> keepalived systemd service file has multiple problems
> 
> 1) Missing reload option
> Reloading keepalived is useful in cases where you want to remove
> a VRRP IP, or add a new VRRP IP without removing existing IPs.
> 
> This should be added to keepalived.service:
> 
>     ExecReload=/bin/kill -1 $MAINPID
> 
> 2) Stop does not always remove VRRP IPs
> By default, keepalived running in VRRP mode starts 2 processes.
> When systemd uses its default stop method (cgroup), it kills
> both of these processes, and this does not allow keepalived to
> perform any required cleanup (such as removing VRRP IPs).  On stop,
> only the main process should receive a kill signal
> 
> This should be added to keepalived.service:
> 
>     KillMode=process
> 
> 
> Version-Release number of selected component (if applicable):
> keepalived-1.2.2-3.fc16

Thanks for the suggestions. I was able to recreate the problem with virtual IP addresses not being removed after a 'systemctl stop keepalived.service'. The missing reload should also be addressed. I'll add both of these to the service file and do some testing.

Comment 2 Ryan O'Hara 2012-09-04 16:30:48 UTC
Fixed in rawhide.

Comment 3 Fedora Update System 2012-09-04 17:55:01 UTC
keepalived-1.2.7-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/keepalived-1.2.7-1.fc17

Comment 4 Fedora Update System 2012-09-04 17:56:21 UTC
keepalived-1.2.7-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/keepalived-1.2.7-1.fc18

Comment 5 Fedora Update System 2012-09-17 23:28:45 UTC
keepalived-1.2.7-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2012-09-19 03:11:41 UTC
keepalived-1.2.7-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.