Switch existing cluster and LB to private IPs
I have an existing MariaDB cluster with s9 controller, 3 nodes and 1 load balancer.
I need to switch the configurations to use private IPs instead of the public IPs (all servers have both public and private IPs assigned and active).
I need to know what config files need to be edited and where to accomplish this, for now I want to switch the 3 DB nodes and the LB over to private IPs. (The controller can reach either network, planning to leave it setup on the public one for remote access).
-
Hi Brian,
Could you solve the problem? I have similar problem.
I have a multimaster cluster with MariaDB Galera working properly, it is set to perform the replica through its WAN interface with wsrep_sst_method = xtrabackup-v2. This configuration was a result of a previous migration from another datacenter, but now I need to take advantage from 10Gbps internal network which gives me the new datacenter and for this I need to reconfigure the cluster IPs. That is changing the WAN IPs to LAN IPs. There is a specific procedure for this? Or I should just shut down gracefully the nodes, change the IP and start again?
-
Hi guys,
we will try and provide you with a procedure for this.
Will the controller (cmon process) still be able to communicate with the nodes on the addresses defined in /etc/cmon.d/cmon_X.cnf (where X is the cluster id) under mysql_server_addresses? Or will the controller change IP too?
Best regards
Johan
-
Hi,
As long as you have a communication set between public and private network, all you need to do is to change IP's in my.cnf and execute a rolling restart on your Galera cluster. Most likely you need to change following variables:
wsrep_node_address
wsrep_node_name
wsrep_cluster_addressIf you do not have routing set between public and private networks, things may be more complex. Right now I don't have a way to test it correctly but what you could do is to fill both local and public IP's in wsrep_cluster_address variable - this, hopefully, will be enough to get them in touch and run a rolling restart.
When it comes to the IP change on the CC: make sure you have correct grants for cmon user to the database - both local (you may want to change the host from public IP to private IP) and to your Galera cluster. Next steps would be to:
1. Stop cmon process (service cmon stop)
2. Remove entries with public IP's from server_node and mysql_server tables in cmon schema
3. Start cmon process (service cmon start)Those steps were enough for me to migrate from public to private IP's in EC2. Under some circumstances you may find Apache configuration change required although it should not be needed if you use default settings - CC UI should be reachable using both public and private IP's.
Thanks,
Krzysztof
Please sign in to leave a comment.
Comments
5 comments