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

StatefulSet using AWS EBS - Deploy StatefulSet - mysql-0 and mysql-1 are not in sync #8

Open
reagaros opened this issue Feb 5, 2022 · 1 comment

Comments

@reagaros
Copy link

reagaros commented Feb 5, 2022

StatefulSet using AWS EBS - Deploy StatefulSet - mysql-0 and mysql-1 are not in sync.

This is for mysql-1 which has the table with data

 kubectl -n workshop run mysql-client --image=mysql:5.7 -it --rm --restart=Never --  mysql -h mysql-1.mysql -e "SELECT * FROM dev.product"                                                             
+--------+---------------+
| prodId | prodName      |
+--------+---------------+
| 999    | Mountain Bike |
| 1      | blog-db       |
+--------+---------------+

This is for mysql-0 which does not have either the table or the data, it is also unclear which one is leader and which one is follower.

kubectl -n workshop run mysql-client --image=mysql:5.7 -it --rm --restart=Never --  mysql -h mysql-0.mysql -e "SELECT * FROM dev.product"                                                             
ERROR 1146 (42S02) at line 1: Table 'dev.product' doesn't exist

The additional replicas if scaled has the synced data.

@praseedasathaye
Copy link
Contributor

I am not able to reproduce this issue. I get the info everytime.

TeamRole:~/environment/eks-app-mesh-polyglot-demo (master) $ kubectl -n workshop run mysql-client --image=mysql:5.7 -it --rm --restart=Never --\
>   mysql -h mysql-read -e "SELECT * FROM dev.product"
+--------+---------------+
| prodId | prodName      |
+--------+---------------+
| 999    | Mountain Bike |
| 1000   | Road Bike     |
+--------+---------------+
pod "mysql-client" deleted
TeamRole:~/environment/eks-app-mesh-polyglot-demo (master) $ kubectl -n workshop run mysql-client --image=mysql:5.7 -it --rm --restart=Never --\
>   mysql -h mysql-read -e "SELECT * FROM dev.product"
+--------+---------------+
| prodId | prodName      |
+--------+---------------+
| 999    | Mountain Bike |
| 1000   | Road Bike     |
+--------+---------------+
pod "mysql-client" deleted
TeamRole:~/environment/eks-app-mesh-polyglot-demo (master) $ kubectl -n workshop run mysql-client --image=mysql:5.7 -it --rm --restart=Never --  mysql -h mysql-read -e "SELECT * FROM dev.product"
+--------+---------------+
| prodId | prodName      |
+--------+---------------+
| 999    | Mountain Bike |
| 1000   | Road Bike     |
+--------+---------------+
pod "mysql-client" deleted
TeamRole:~/environment/eks-app-mesh-polyglot-demo (master) $ kubectl -n workshop run mysql-client --image=mysql:5.7 -it --rm --restart=Never --  mysql -h mysql-read -e "SELECT * FROM dev.product"
+--------+---------------+
| prodId | prodName      |
+--------+---------------+
| 999    | Mountain Bike |
| 1000   | Road Bike     |
+--------+---------------+
pod "mysql-client" deleted
TeamRole:~/environment/eks-app-mesh-polyglot-demo (master) $ 

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