[Rdo-list] How to know which galera server haproxy is pointing in an overcloud HA env

Marius Cornea mcornea at redhat.com
Wed Oct 7 11:07:30 UTC 2015


Hi Raoul,

You can check the haproxy stats dashboard and determine which of the backend nodes takes the sessions. To access it look for the ip address haproxy.stats binds to in haproxy.cfg and reach it via http on port 1993.

Thanks,
Marius 

----- Original Message -----
> From: "Raoul Scarazzini" <rasca at redhat.com>
> To: rdo-list at redhat.com
> Sent: Wednesday, October 7, 2015 12:45:32 PM
> Subject: [Rdo-list] How to know which galera server haproxy is pointing in an overcloud HA env
> 
> 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
> 
> _______________________________________________
> Rdo-list mailing list
> Rdo-list at redhat.com
> https://www.redhat.com/mailman/listinfo/rdo-list
> 
> To unsubscribe: rdo-list-unsubscribe at redhat.com
> 




More information about the rdo-list mailing list