Open tapuhi opened 7 years ago
@tapuhi this sounds like either job for your puppet
or for some scripting.
To let you know how we do this:
read_only=1
in my.cnf
(some snowflakes exists for dev/testing machines)read_only=0
if promoted as master by orchestrator
.You can easily check which are all the co-masters via:
curl -s http://path.to.orchestrator/api/all-instances | jq -r '.[] | select(.IsCoMaster==true) | .Key.Hostname'
and likewise who are all the non-co-masters:
curl -s http://path.to.orchestrator/api/all-instances | jq -r '.[] | select(.IsCoMaster==false) | .Key.Hostname'
Hi, In our configuration we have mult-dc co-masters and only those can have RW traffic all other replicas can serve as RO replicas. Is there a way to cause orchestrator to set all non co-master replicas to be read-only, or is that something I need to set manually ?
BR