You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/09/26 09:05:53 UTC

[GitHub] [ozone] Xushaohong opened a new pull request #2677: HDDS-5686. Support transfer leadership in raft based ha cluster

Xushaohong opened a new pull request #2677:
URL: https://github.com/apache/ozone/pull/2677


   ## 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.
   
   
   Changes:
      * the whole procedure is as following
      * Phase1:
      *   server client -> get QuorumInfo from server -> check address whether in the quorum
      *
      * Phase2:
      *   raft client -> set priority -> trigger transferLeadership -> old leader step down -> new leader take office
     
   P.S.Quorum info includes
   (
     private RaftGroupId raftGroupId;
     private Collection<RaftPeer> peers;
     private String leaderRaftPeerId;
   )
   
   ## 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 cases shoted
   
   ![demo3](https://user-images.githubusercontent.com/10106574/134800158-b03933f5-7c43-45da-9dd2-ffd3e37203c0.png)
   ![demo2](https://user-images.githubusercontent.com/10106574/134800159-4a7ead4f-cbf5-462c-a79f-30d06bb1cf11.png)
   ![demo1](https://user-images.githubusercontent.com/10106574/134800154-bc4bd2aa-dd81-4074-9a7b-906c68a38de9.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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Xushaohong closed pull request #2677: HDDS-5686. Support transfer leadership in raft based ha cluster

Posted by GitBox <gi...@apache.org>.
Xushaohong closed pull request #2677:
URL: https://github.com/apache/ozone/pull/2677


   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Xushaohong closed pull request #2677: HDDS-5686. Support transfer leadership in raft based ha cluster

Posted by GitBox <gi...@apache.org>.
Xushaohong closed pull request #2677:
URL: https://github.com/apache/ozone/pull/2677


   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Xushaohong closed pull request #2677: HDDS-5686. Support transfer leadership in raft based ha cluster

Posted by GitBox <gi...@apache.org>.
Xushaohong closed pull request #2677:
URL: https://github.com/apache/ozone/pull/2677


   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org