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

lamp-infrastructure fails to setup mysql slave #14

Closed
dabutcher opened this issue Apr 16, 2015 · 1 comment
Closed

lamp-infrastructure fails to setup mysql slave #14

dabutcher opened this issue Apr 16, 2015 · 1 comment

Comments

@dabutcher
Copy link

When I run the vagrant up for the lamp-infrastructure example It completes successfully but doesn't setup the mysql slave instance.

Environment:
ansible 1.8.2
Vagrant 1.6.3

If I re-run the playbook:

ansible-playbook configure.yml -i inventories/vagrant/inventory -u vagrant --private-key=~/.vagrant.d/insecure_private_key

I get the following errors:

TASK: [geerlingguy.mysql | Check slave replication status.] *******************
skipping: [192.168.2.5]
failed: [192.168.2.6] => {"failed": true}
msg: Server is not configured as mysql slave
...ignoring

...

TASK: [geerlingguy.mysql | Configure replication on the slave.] ***************
skipping: [192.168.2.5]
failed: [192.168.2.6] => {"failed": true, "parsed": false}
SUDO-SUCCESS-jsqcdcjyncxfohjolqzdpxleconmwwvd
Change master
Traceback (most recent call last):
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1429224404.57-222078884447207/mysql_replication", line 1949, in <module>
    main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1429224404.57-222078884447207/mysql_replication", line 367, in main
    changemaster(cursor, chm, chm_params)
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1429224404.57-222078884447207/mysql_replication", line 165, in changemaster
    cursor.execute(query, chm_params)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''106'' at line 1")
@geerlingguy
Copy link
Owner

It looks like this issue is directly related to an upstream bug in the geerlingguy.mysql role: geerlingguy/ansible-role-mysql#10

I'm going to close this bug report in favor of that one. I'm guessing the reason this error occurred is that the slave server was set up without slave status in the first provisioning go-round, then when it came time to switch it to replicate, the log position was incorrect (> 106).

Thanks for sending me the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants