[Openstack] Keepalived || (Keepalived && haproxy)

Turbo Fredriksson turbo at bayour.com
Thu Oct 20 20:45:26 UTC 2016


I've been having problem with keepalived ever since I setup my
secondary control node a couple of weeks ago.

It doesn't seem to work as I intended/thought it would.

Most (if not all) services don't seem to load balance properly.

I can usually access the service from 'the outside' (as in not
the local IP network the control node is on), but not from
'the inside'. Which is kind'a the whole point :).

What happens is that from 'the inside', the port is open,
but disconnects directly, without 'reaching' the backend
port/service. As in, keepalived doesn't 'forward' the request
(at all or properly).


My virtual server entries in the config looks like this:

----- s n i p -----
# => MySQL
virtual_server 10.0.4.252 3306 {
    delay_loop 1
    protocol TCP

    # Use round-robin scheduling in this example
    lb_algo rr

    # Direct Routing Response
    lb_kind DR

    real_server 10.0.4.1 3306 {
        weight 1
        inhibit_on_failure

        TCP_CHECK {
           connect_timeout 1
           connect_port 3306
        }
    }

    real_server 10.0.4.9 3306 {
        weight 1
        inhibit_on_failure

        TCP_CHECK {
           connect_timeout 1
           connect_port 3306
        }
    }
}
----- s n i p -----

As far as I understand the keepalived documentation, this is
a valid and correct configuration!

But am I missing something?


PS. What I _want_ to do is:

    1. Have ONE IP that (can/will) migrate between the physical
       hosts if/when something happens to the one currently 'having'
       it.

    2. Load balance a couple of important servers, not just have
       a 'hot standby' service [that takes over when the primary
       dies or needs to be taken down for maintenance].
--
Michael Jackson is not going to buried or cremated
but recycled into shopping bags so he can remain white,
plastic and dangerous for kids to play with.





More information about the Openstack mailing list