Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
joffrey92 opened this issue Apr 23, 2014 · 1 comment
Closed

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

joffrey92 opened this issue Apr 23, 2014 · 1 comment
Labels
Milestone

Comments

@joffrey92
Copy link
Contributor

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
Copy link
Contributor Author

$ 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)

  •    OTHERS=$(echo $RES | cut -d ' ' -f 4)
    
  • Fix garbd issue that shows empty string in wsrep_incoming_addresses : Bug glb/mysql.sh parsing error when starting arbitrator daemon #11

  •    OTHERS=$(echo $RES | cut -d ' ' -f 4 | sed -e 's/^,//g' -e 's/,,*/,/g' -e 's/,$//g' )
    

    If wsrep_local_state variable was not found on the server, we assume it

    is a regular MySQL and is ready for connections (it accepted connection)

     STATE=${STATE:-"4"}
    

$ patch -p0 < glb_issue11.patch

joffrey92 added a commit to joffrey92/glb that referenced this issue Apr 24, 2014
joffrey92 added a commit to joffrey92/glb that referenced this issue Apr 24, 2014
joffrey92 added a commit to joffrey92/glb that referenced this issue Apr 24, 2014
@ayurchen ayurchen added the bug label Apr 24, 2014
@ayurchen ayurchen added this to the glb-1.1.0 milestone Apr 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants