[Rdo-list] How to know which galera server haproxy is pointing in an overcloud HA env
Raoul Scarazzini
rasca at redhat.com
Wed Oct 7 10:45:32 UTC 2015
Hi all,
I'm operating in an overcloud HA environment, using galera as db
backend. In haproxy I've got this configuration:
listen mysql
bind 172.16.20.11:3306
option tcpka
option httpchk
stick on dst
stick-table type ip size 1000
timeout client 0
timeout server 0
server overcloud-controller-0 172.16.20.13:3306 backup check fall 5
inter 2000 on-marked-down shutdown-sessions port 9200 rise 2
server overcloud-controller-1 172.16.20.14:3306 backup check fall 5
inter 2000 on-marked-down shutdown-sessions port 9200 rise 2
server overcloud-controller-2 172.16.20.15:3306 backup check fall 5
inter 2000 on-marked-down shutdown-sessions port 9200 rise 2
Now, for what I've understood, the "stick on dst" directive determines
that just one of the three galera servers is contacted by the proxy
(even if the galera configuration is an active/active/active setup), and
this is fine for a couple of reasons that involves locking and things
like this.
So using stick on dst makes our balancer operating as
active-standby-standby without automatic failback. And this is also fine.
What I am looking for at this point is to understand which server
haproxy is pointing.
I've enabled this option in haproxy conf:
stats socket /var/run/haproxy mode 600 level admin
so I am able to see, on the host which carries the VIP associated to
haproxy bind address, the stick table:
[root at overcloud-controller-1 ~]# echo "show table mysql" | socat
/var/run/haproxy stdio
# table: mysql, type: ip, size:1000, used:1
0x7f9babb4d7d4: key=172.16.20.11 use=0 exp=0 server_id=1
But of course this does not help me to understand which host is haproxy
contacting. I was expecting to see on the output something useful, but
the key is the value I already know.
Can you help me to find out a way?
Thanks a lot,
--
Raoul Scarazzini
rasca at redhat.com
More information about the dev
mailing list