This bug was fixed in the package keepalived - 1:1.2.2-3ubuntu2.13.04.1
---------------
keepalived (1:1.2.2-3ubuntu2.13.04.1) raring-proposed; urgency=low
* debian/patches/05_fix_address_comparison.patch:
- Two different IPv4 addresses were returned to be
equal while this was not the case. (LP: #1211876)
-- Adam Stokes <[email protected]> Fri, 27 Sep 2013 11:47:47 -0400
** Changed in: keepalived (Ubuntu Raring)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to keepalived in Ubuntu.
https://bugs.launchpad.net/bugs/1211876
Title:
keepalived reload buggy due to improper ipv4 address comparison
Status in “keepalived” package in Ubuntu:
Fix Released
Status in “keepalived” source package in Precise:
Fix Released
Status in “keepalived” source package in Quantal:
Fix Released
Status in “keepalived” source package in Raring:
Fix Released
Bug description:
[Impact]
There are at least 2 identified problems with keepalived on Precise when
trying to reload the configuration (/etc/keepalived/keepalived.conf):
(a) The removal of a server from the cluster does not work when the
port of that server is in use by another member server
(b) The change of weight of a cluster member does not work
Reload is done by either:
1. sudo service keepalived reload
2. sudo kill -HUP `pidof keepalived`
The upstream devel list suggests that issue (a) [1] has been resolved
in version 1.2.3 which is currently only in Debian unstable via
version 1.2.7. I can't find the actual bug supposedly filed by 'Ronie
Gilberto Henrich'. I have not tested 1.2.7 as it is not easily
available to me.
The pertinent entry for (a) in the upstream changelog [2] I believe is
here:
{{{ * check : Fix IPv4 address comparison routine. }}}
This bug is a request to have fixes for both issues ([3] for (a))
introduced into Ubuntu 12.04.
[1]: http://comments.gmane.org/gmane.linux.keepalived.devel/3708
[2]: http://www.keepalived.org/changelog.html
[3]:
https://github.com/acassen/keepalived/commit/e7931c851ecd359379c6bbc5b39287e36cbfbf25
[Test Case]
4A. Steps to reproduce issue #1:
(a) Stop keepalived
$ sudo service keepalived stop
(b) Begin with a simple configuration file (attached: keepalived.conf)
$ cat keepalived.conf | sudo tee /etc/keepalived/keepalived.conf
$ sudo service keepalived start
$ sudo ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.100:80 wrr
-> 192.168.1.101:8080 Masq 1 0 0
-> 192.168.1.102:8080 Masq 1 0 0
(c) Add a stanza to the configuration file (a server with a port that
is in use by another server)
--------------
real_server 192.168.1.103 8080 {
weight 1
inhibit_on_failure
}
--------------
(d) Reload the configuration
$ sudo service keepalived reload
$ sudo ipvsadm -Ln
--------------
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.100:80 wrr
-> 192.168.1.101:8080 Masq 1 0 0
-> 192.168.1.102:8080 Masq 1 0 0
-> 192.168.1.103:8080 Masq 1 0 0
--------------
(e) Remove the .103 stanza
(f) Perform step (d) above
--------------
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.100:80 wrr
-> 192.168.1.101:8080 Masq 1 0 0
-> 192.168.1.102:8080 Masq 1 0 0
-> 192.168.1.103:8080 Masq 1 0 0
--------------
Note the .103 server remains.
4B. Steps to reproduce issue #2:
(a) Perform steps (a) and (b) from 4A
(b) Edit a stanza in the configuration file (change weight from '1' to '0' in
the .102 server)
--------------
real_server 192.168.1.102 8080 {
weight 0
inhibit_on_failure
}
--------------
(c) Perform step (d) from 4A
--------------
P Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.100:80 wrr
-> 192.168.1.101:8080 Masq 1 0 0
-> 192.168.1.102:8080 Masq 1 0 0
--------------
Note the original weight of '1' for .102 server remains.
4C. Steps to counterprove issue #1:
(a) Perform steps (a) and (b) from 4A
(b) Add a stanza to the configuration file (a server with a port that is not
in use by another server)
--------------
real_server 192.168.1.103 8081 {
weight 1
inhibit_on_failure
}
--------------
(c) Perform step (d) from 4A
--------------
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.100:80 wrr
-> 192.168.1.101:8080 Masq 1 0 0
-> 192.168.1.102:8080 Masq 1 0 0
-> 192.168.1.103:8081 Masq 1 0 0
--------------
(d) Remove the .103 stanza from the configuration file
(e) Perform step (d) from 4A
--------------
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.100:80 wrr
-> 192.168.1.101:8080 Masq 1 0 0
-> 192.168.1.102:8080 Masq 1 0 0
--------------
Note the .103 server does not remain.
5. Known Workaround:
- Restart the daemon:
$ sudo service keepalived restart
OR
- Manage the daemon with ipvsadm:
(a) Add a server
$ sudo ipvsadm -a -t 192.168.0.100:80 -r 192.168.1.103:8080 -m
(b) Edit a server (change weight)
$ sudo ipvsadm -e -t 192.168.0.100:80 -r 192.168.1.103:8080 -m -w 0
(c) Delete a server
$ sudo ipvsadm -d -t 192.168.0.100:80 -r 192.168.1.103:8080
[Regression Potential]
This introduces the proper behavior for comparing ipv4 addresses. We may see
issues where keepalived was working in an environment and after upgrade fails.
This probably indicates that the environment may have issues outside of
keepalived as the previous behavior was incorrect.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/keepalived/+bug/1211876/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-ha
Post to : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help : https://help.launchpad.net/ListHelp