[
https://issues.apache.org/jira/browse/HDDS-11839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17923583#comment-17923583
]
Peter Lee commented on HDDS-11839:
----------------------------------
The transfer leadership request with new leader id would go through
ratisHelper.transferRatisleadership to do the transfer, in it, it search raft
peer with that given id.
So I think if we want to accept both type of id, we should lookup the raft peer
id mapping to convert the for example scm node name to its raft peer id at the
transfer leadership service handler first.
Is there any way to get the mapping of the node name and its raftPeer id?
https://github.com/apache/ozone/blob/d9c7d1deedc9468578e10771873cf0ea246099b0/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java#L851-L898
https://github.com/apache/ozone/blob/d9c7d1deedc9468578e10771873cf0ea246099b0/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L3355-L3397
https://github.com/apache/ozone/blob/d9c7d1deedc9468578e10771873cf0ea246099b0/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java#L533-L548
> Mismatch in leadership transfer node ID
> ---------------------------------------
>
> Key: HDDS-11839
> URL: https://issues.apache.org/jira/browse/HDDS-11839
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone CLI
> Reporter: Pyttel
> Assignee: Peter Lee
> Priority: Major
> Labels: newbie
>
> Leadership transfer expects leader to be identified by UUID for SCM, but node
> ID for OM:
> {code}
> $ ozone admin scm transfer --new-leader-id scm1
> Target scm1 not found in group [891cd056-3cf1-4e52-9cac-eff0af7bfefe,
> b25f513f-ddf7-4382-a3f0-fe5b209a7a26, ac63c8ae-1f4c-4fa7-9eed-e279d0b573ff].
> $ ozone admin om transfer --new-leader-id om1
> Transfer leadership successfully to om1.
> {code}
> Ideally it should accept both kinds of ID.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]