-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
markReadOnlyNodesInOrc broke gracefulfailover process #566
Comments
Hi @jianhaiqing, thank you for investigating this and reporting it! Cluster condition |
As you know failover process of orchestrator is very fast. reconcile process and failover process are totally isolated, so you can't guarantee the executing sequence.
|
let me elaborate the executing sequence of these two process: orchestrator and orchestrator controller 1. orchestrator failover: topology before failover
2. orchestrator_controller, just repeatedly set master writable or replica read-only .And pre-failover will set cluster in fail-over state, and suppose to prevent master and replica read_only is set |
A solution can be to let the orchestrator set nodes in read-only as @dougfales proposes in #522. But then we can't make use of the read-only mode properly, because, in case of a failover the cluster will end up being writable and this is what we wanted to avoid making operator setting the read-only state. Please let me know what is your propose. |
Yes, @AMecea is right, our change does trade the cluster |
https://github.com/presslabs/mysql-operator/blob/28ef010d9c7e6acc2518b78ef44ae220040818f0/pkg/controller/orchestrator/orchestrator_reconcile.go#L515
As you can see the following logs from orchestrator, the writable function broke the gracefulfailover process, since master is set read_only as true, and wait for CandidateReplica catch up with given binlog-position.
Can we check if cluster is ready or not before set master writable ?
some discussion about the issue in orchestrator. openark/orchestrator#1213
The text was updated successfully, but these errors were encountered: