Bug 768119 - keepalived reload does not remove real server
Summary: keepalived reload does not remove real server
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: keepalived
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ryan O'Hara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-15 19:42 UTC by Ryan O'Hara
Modified: 2012-04-16 17:58 UTC (History)
2 users (show)

Fixed In Version: keepalived-1.2.2-4.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-20 14:51:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix IPv4 address comparison routine. (911 bytes, application/octet-stream)
2011-12-15 19:42 UTC, Ryan O'Hara
no flags Details

Description Ryan O'Hara 2011-12-15 19:42:53 UTC
Created attachment 547465 [details]
Fix IPv4 address comparison routine.

Description of problem:

Removing a real server from a virtual server in keepalived.conf and then reloading (eg. service keepalived reload) does not remove that real server from ipvs tables.

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

keepalived-1.2.2-3 (F17)
keepalived-1.2.2-2 (EPEL6)

How reproducible:

Always

Steps to Reproduce:

1. Configure keepalived to have multiple real servers within a virtual server.
2. Start keepalived, verify all real servers are listed in ipvsadm output. For example:

# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.122.201:http rr
  -> 192.168.122.103:http         Route   1	 0          0
  -> 192.168.122.104:http         Route   1	 0          0
  -> 192.168.122.105:http         Route   1      0          0

3. Now edit keepalived.conf and remove a real server.
4. Run 'service keepalived reload'.
5. Check ipvsadm output. The real server removed in step #3 should no longer be listed.

Actual results:

The real server removed from keepalived.conf is still listed in ipvsadm output after a reload. For example, removing 192.168.122.105 from config file then reloading, 192.168.122.105 still shows up in ipvsadm.

Expected results:

The real server removed from keepalived.conf should not be listed in ipvsadm after keepalived reload. Removing 192.168.122.105 from config file then reloading should give this output from ipvsadm:

# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.122.201:http rr
  -> 192.168.122.103:http         Route   1	 0          0
  -> 192.168.122.104:http         Route   1	 0          0

Additional info:

This problem is due to a bug in keepalived where is compares two IPv4 addresses. I have tested a patch that fixes this problem. This bug exists in the upstream git repo (version 1.2.2) and is present in at least F17 and epel6. I've applied the patch, done a scratch build (epel6) and tested. Problem solved.

Comment 1 Ryan O'Hara 2012-03-20 14:38:05 UTC
Fixed in F16 (keepalived-1.2.2-4.fc16).
Fixed in F17 (keepalived-1.2.2-5.fc17).

Comment 2 Ryan O'Hara 2012-03-20 14:51:36 UTC
Fixed in EPEL6 (keepalived-1.2.2-3.el6)

Comment 3 Fedora Update System 2012-03-30 13:40:40 UTC
keepalived-1.2.2-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/keepalived-1.2.2-5.fc17

Comment 4 Fedora Update System 2012-03-30 13:41:41 UTC
keepalived-1.2.2-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/keepalived-1.2.2-4.fc16

Comment 5 Fedora Update System 2012-03-30 13:43:17 UTC
keepalived-1.2.2-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/keepalived-1.2.2-3.el6

Comment 6 Fedora Update System 2012-04-11 16:56:31 UTC
keepalived-1.2.2-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2012-04-12 03:22:38 UTC
keepalived-1.2.2-5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2012-04-16 17:58:24 UTC
keepalived-1.2.2-3.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


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