[Bug 1211876] Please test proposed package

Brian Murray brian at ubuntu.com
Thu Oct 3 21:49:31 UTC 2013


Hello Peter, or anyone else affected,

Accepted keepalived into precise-proposed. The package will build now
and be available at
http://launchpad.net/ubuntu/+source/keepalived/1:1.2.2-3ubuntu1.1 in a
few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, and change the tag
from verification-needed to verification-done. If it does not fix the
bug for you, please add a comment stating that, and change the tag to
verification-failed.  In either case, details of your testing will help
us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
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 Committed
Status in “keepalived” source package in Quantal:
  Fix Committed
Status in “keepalived” source package in Raring:
  Fix Committed

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



More information about the Ubuntu-sponsors mailing list