mha4mysql-manager
mha4mysql-manager copied to clipboard
--orig_master_is_new_slave does not set read_only=1 on the old master
The old master stays read_only=OFF and once the UNLOCK TABLES is released clients are still connected there allowing writes on the old master.
This is intended since not all users set read_only=1 on slaves. You can change read_only settings on a custom script (master_ip_online_change). A sample script exists in a MHA Manager tarball.
samples/scripts/master_ip_online_change
Maybe it's worth adding a new argument to execute read_only on the orig master or not.
Yes, I found that, thanks. It was counter-intuitive to me to leave the old master as a slave and not revert the read_only state that MHA manages in the other direction. I guess my ideal here is a configuration parameter that tells MHA to manage read_only or not.
mha-helper can be used to set the old master to read only. It also supports super-read-only: https://github.com/grypyrg/mha-helper