codership / glb

Galera Load Balancer - a simple TCP connection proxy and load-balancing library
GNU General Public License v2.0
154 stars 51 forks source link

glb/mysql.sh parsing error when starting arbitrator daemon #11

Closed joffrey92 closed 10 years ago

joffrey92 commented 10 years ago

Hi,

I start a galera load balancer 1.0.1 with following start options:

[root@lb01 bin]# glbd -w exec:"mysql.sh -d 2 -umon -pmon" -b 10.0.0.1:3333 10.0.0.2:3306:1 -D

It detects successfully the cluster topology, and adds the available nodes to the load balancing policy.

When I start an arbitration daemon (garbd), this changes the wsrep_incoming_address from: | wsrep_incoming_addresses | 10.0.0.2:3306,10.0.0.3:3306,10.0.04 | to: | wsrep_incoming_addresses | ,10.0.0.2:3306,10.0.0.3:3306,10.0.04 |

And the following error is displayed in glbd: ERROR: glb_socket.c:90: Unknown host ,.

ERROR: glb_dst.c:86: Invalid argument ERROR: glb_wdog.c:450: Failed to parse destination ',': 22 (Invalid argument). Skipping.

The parsing from mysql.sh is failing. Note: the load-balancer still works correctly, and route queries to healthy nodes.

Idea fix1: Do not try to contact empty IPs Idea fix2: Put the IP of the garbd daemon in the listening adresses, and tag it with a "garbd" so that it is not used for load-balancing or other purposes.

Thanks in advance, Joffrey

joffrey92 commented 10 years ago

$ cat glb_issue11.patch --- mysql.sh 2014-04-24 10:15:26.541455852 +0200 +++ mysql_glbissue11.sh 2014-04-24 10:15:39.804455302 +0200 @@ -55,7 +55,8 @@ if [ $? -eq 0 ] then STATE=$(echo $RES | cut -d ' ' -f 2)

$ patch -p0 < glb_issue11.patch