-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Update of mysql cluster lead to problem with replication. #565
Comments
Hi @DeamonMV, thank you for filling this issue. Here are some tips that may help in the future:
When a pod is deleted the PVC is not removed. So in order to reinitialize a node, you can scale it down to 1 replica and then back. By doing this it will delete the PVC for replica and it will reinitialize from node 0. Also, can you tell me which was the master before the update? Because it seems that node 0 was slave and node 1 was master and after update node 0 become new master and node 1 new slave, is that correct? If yes then you set node 0 slave to node 1 so you made them co-masters. |
Hello @AMecea Sorry, but I can't tell for sure, but I remember that cluster-com-mysql-0 was a master.
Yes, I just deleted a pod, and do not touched the amount of replicas of mysql cluster. Is here exist a way to do such reinitialization of mysql node without deleting a PVC? just to be sure that here no any other way. |
I just experienced a similar issue (well it happened 3 weeks ago but now I just realized that my slave is out of sync 🤭).
|
What is the problem
Update of the mysql cluster lead to problem with replication.
How I got this problem
My mysql cluster had worked about 20 days without problem. Yesterday I deployed an update for mysql and after this I got problem. I've updated mysql configuration.
Operator started updates from slave mysql node. After some time, about 3 minutes, slave node become master, and old master went to termination. But old master didn't become a slave.
Log of new slave node:
This message
xxxxx [Note] Got packets out of order
writing to the log without ending. I've waited about 10 minutes but cluster didn't become ready.Slave status
Deleting slave mysql node didn't helped.
What I did to make cluster work
stop slave;
slave reset;
CHANGE MASTER TO MASTER_HOST='cluster-com-mysql-1.mysql.ch-wordpress', MASTER_USER='sys_replication', MASTER_PASSWORD='GYTB7hegSVZ234sdfz6oM';
Because of this
Slave_SQL_Running: No
Relay_Log_Pos: 833
Relay_Master_Log_File: mysql-bin.000079
I have tried one more thingslave stop;
slave reset;
CHANGE MASTER TO master_auto_position=0;
CHANGE MASTER TO MASTER_HOST='cluster-com-mysql-1.mysql.ch-wordpress', MASTER_USER='sys_replication', MASTER_PASSWORD='GYTB7hegSVZ234sdfz6oM', MASTER_LOG_FILE='mysql-bin.000081', MASTER_LOG_POS= 234;
After this attempt replication status look better, but mysql cluster stop working at all. K8s endpoints
cluster-com-mysql-master
andcluster-com-mysql
become empty. So I had to delete cluster and recreate it again.What is my question
How to deal with such problems. It's seems that operator not able to restore cluster. Can you please explain the algorithm, I do not want to recreate mysql cluster every time.
What is ENV
kubernetes 1.14.6
rook ceph 0.9.3/13.2.6
mysql operator 0.3.9
mysql version 5.7
mysql_conf:
The text was updated successfully, but these errors were encountered: