This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
graceful-takeover-auto switchover failed. when i set true for PreventCrossDataCenterMasterFailover. #1406
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I don't know if this is a bug. When I use one master and two slave architecture and set true for PreventCrossDataCenterMasterFailover, the instance selected for automatic switching is always the instance of another machine room, resulting in the failure of the whole switching
from orchestrator base version: 3.2.4
my architecture:
When I use PreventCrossDataCenterMasterFailover set true, and DetectDataCenterQuery is :
Main configuration:
I issue this command:
orchestrator-client -c graceful-master-takeover-auto -alias test
return error:
Status after switching:
I Debug code, find this code and i fell this logic unreasonable:
function calls:
This result is caused by the error of the promotion instance returned here:
And I have added judgment on the data center, so that I can switch in the test environment.
I think the automatic selection of instances should follow the configuration of the configuration file, otherwise the configuration will be meaningless.
Thanks!