replication-manager
replication-manager copied to clipboard
does replication-manager change content of my.cnf of db server?
When switchover, replication-manager will set read_only=1 in new slave (original master) DB nodes.
This new slave (original master) has mysql variable read_only=0 in my.cnf. When we restart this new slave, we found that read_only keeps value 0. replication-manger will not change it to read_only=1 after DB restart. Need manual toggle the value dynamically. Is this expected behavior?
Attached the config for reference. config.toml.txt
Regards, William
Hi William,
yes that is expected behavior by default,
I would advice to set read-only to on in every node config of the cluster and let replication-manager manage to trigger read write on the master based on topoogy detection in case of DC crash it can help preserve the old leader from any applications or proxy setup on that part of the network
Replication-manager can act as you expect only when db configurator is used , to make this append on demand you need to enable dbjobs via ssh and allow the repman box should be able to ssh to to db nodes and so need to provide the private key that it will lookup by default in the root directory when a node is requested to start via replication-manager not system command then the dbjobs will download the config.tar.gz from the node at the monitoring-address config variable and unpack it to /etc/mysql so that the configuration reflect the choice you have specify in all the prov variables
--prov-db-disk-iops string
--prov-db-disk-size string in G
--prov-db-memory string in M
--prov-db-cpu-cores string
--prov-db-tags string playbook configuration tags (default "semisync,row,innodb,noquerycache,threadpool,slow,pfs,docker,linux,readonly,diskmonitor,sqlerror,compressbinlog,readonly")
Those step for the first cluster are a little tricky to configure and we can help for it via service and support because by default the product is build of container orchestration where we have specific organisation of database file system to better address performance based on multiple FS block size
But i would suggest to use tag nosplitpath in database config so that replication-manager does not configure individual files store inside /var/lib/mysql/.system
To get a copy/backup of your original cnf file and to after first start from the replication-manager api of gui that will probably failed , to store it under directory /etc/mysql/custom.d/ This directory based on config produced by replication-manager is alway read last and so none of your parameter will be lost and slowly remove parameters that you would like to be manager by replication-manger from it
Hope it helps