Xushaohong opened a new pull request #2686:
URL: https://github.com/apache/ozone/pull/2686
## What changes were proposed in this pull request?
Background:
In a raft based ha cluster, for some reason, we want to transfer leadership
to a specific follower gracefully, now, we have to kill the leader master to
transfer leadership, but the leadership could transfer to an unexpected
follower, we have to kill the leader master again, this is so tricky.
Usage:
This feature is assumed to utilizing a shell command like ```ozone admin
failover [SCM/OM] [host/host:port/'random'] ```, with optional IpAddr we can
transfer the leadership to the target follower, with 'random' we can transfer
leadership to any node except leader node.
The whole procedure is as following:
* Pseudo raft client -> get real raft group info -> check address
* whether in raft peers -> real raft client -> set priority -> trigger
* transferleadership -> new raft leader takes office
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5686
Please replace this section with the link to the Apache JIRA)
## How was this patch tested?
manual tests.
the Integration test will be added soon
Here are some screenshots



--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]