Bug 1270755
Summary: | [RFE] Need to know which host is the master when using stick on dst | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Raoul Scarazzini <rscarazz> |
Component: | haproxy | Assignee: | Ryan O'Hara <rohara> |
Status: | CLOSED WONTFIX | QA Contact: | Brandon Perkins <bperkins> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.3 | Keywords: | FutureFeature, Reopened |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-10-17 15:10:57 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Raoul Scarazzini
2015-10-12 10:09:56 UTC
This is not a bug. I've already replied to the original question on the mailing list and I'll do so again here. It is quite possible that the only node that will have anything stored in the stick table will be the one that owns the VIP. Perhaps a better way to state this is that the only node that will be able to tell you which backend server that is currently the "master" is the one that owns the VIP. If you know which node owns the VIP (which you do), simply dump the stick table on that node and you will see the current "master". If you dump the stick table on a node that does not own the VIP, you haven't discovered anything except which server *was* the "master" when that node owned the VIP. If it never owned the VIP, the stick table will be empty. Perhaps a better approach here is to simple send an SQL query for the hostname to the database VIP. Ryan, as in the subject this is an RFE, not properly a bug. But anyway, maybe I am missing something. Dumping the stick table on the node that owns the VIP gives me only a result like this: [root@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 How can I from these informations understand which is the master? Maybe you are talking about another way of dumping the stick table? Because here the "key" value is the VIP itself (and as you said I already know it) not one of the three servers which I would expect. (In reply to Raoul Scarazzini from comment #3) > Ryan, as in the subject this is an RFE, not properly a bug. But anyway, > maybe I am missing something. Dumping the stick table on the node that owns > the VIP gives me only a result like this: > > [root@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 > > How can I from these informations understand which is the master? Maybe you > are talking about another way of dumping the stick table? Because here the > "key" value is the VIP itself (and as you said I already know it) not one of > the three servers which I would expect. The server with server_id=1 is the current "active" server. I'd avoid calling this the "master". You can get more information about that server if you dump the information about the backend for that particular proxy. I really think the easiest way to detemine the current active database server is to query the VIP for the hostname, eg. "show variables like 'hostname';". |