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
   ![截屏2021-09-28 下午3 59 
40](https://user-images.githubusercontent.com/10106574/135057902-abb104f9-140c-48c2-be36-62d3f2a33944.png)
   ![截屏2021-09-28 下午3 48 
29](https://user-images.githubusercontent.com/10106574/135057915-5b4b74e8-f998-4c41-9ba5-d25c72fcd727.png)
   ![截屏2021-09-28 下午3 51 
06](https://user-images.githubusercontent.com/10106574/135057920-b588a420-cb13-4a16-8ae2-b795991cc54e.png)
   
   
   


-- 
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]

Reply via email to