Docker Community Forums

Share and learn in the Docker community.

Add new data node on running mysql cluster docker

docker

(Sanjaykumbhale) #1

Hello

I am using mysql cluster docker from below example
https://hub.docker.com/r/mysql/mysql-cluster/
I have created a management node, a server node and 2 data node on 4 different Ubuntu machines.
It is working fine.
Then I wanted to add extra data node.
So I added a node on management mysql configuration file i.e. /etc/mysql-cluster.cnf.
Then i tried to restart the management node by using below command from inside docker.
ndb_mgmd -f /etc/mysql-cluster.cnf --reload.
But this is not working.
Anybody having solution for this.


(Sam) #2

"But this is not working."
what error are you getting ?


(Sanjaykumbhale) #3

I am not getting any error.
But the changes are not replicated.
And mysql configuration showing old configuration only.


(Sam) #4

which host did you add that config on
and is that the same host you ran the command on

you said ‘inside docker’… but really needs to be inside the server node


(Sanjaykumbhale) #5

Hi

I added the configuration to the same host where server management deployed.
Yes, i have run the command on the same host from inside docker.
We can run the command from inside docker or outside docker using docker exec command.


(Sam) #6

the configuration file change must be IN the server container, not on the host… the container has its OWN copy of the config…

then you have to use docker exec to send the command to the server container


(Sanjaykumbhale) #7

Sorry for above statement, Actually I wanted to say on the same container.


(Sam) #8

if you docker attached to the server container and do the operations there, does it work?


(Sanjaykumbhale) #9

Nope, it is not working. The changes done in configuration file not working.


(Sam) #10

see https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-online-add-node.html


(Sanjaykumbhale) #11

Same process mentioned in url I have followed before. But it was not working.


(Sam) #12

correct… it says you cannot add a node dynamically…

Important
Currently, you must add new data nodes to an NDB Cluster as part of a new node group. In addition, it is not possible to change the number of replicas (or the number of nodes per node group) online