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 2022/02/28 19:22:25 UTC

[GitHub] [ozone] sadanand48 opened a new pull request #3144: HDDS-6383. SCM Web UI doesn’t show correct leader/follower HA info

sadanand48 opened a new pull request #3144:
URL: https://github.com/apache/ozone/pull/3144


   ## What changes were proposed in this pull request?
   Current code for #getScmRatisRoles calls SCMRatisServer.getRatisRoles() which basically determines the leader based on whether the node is local. 
   `peer.getAddress().concat(isLocal ?
       ":".concat(RaftProtos.RaftPeerRole.LEADER.toString()) :
       ":".concat(RaftProtos.RaftPeerRole.FOLLOWER.toString())) 
   `
   This logic makes sense for other cases since only leader will process this request, but not for jmx case. The web ui  of a particularly scm will show itself as the leader according to this logic which is incorrect. Using scmContext.isLeader() instead to solve this
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-6383
   
   ## How was this patch tested?
   Tested on docker scm ha env
   <img width="1008" alt="Screenshot 2022-03-01 at 12 50 29 AM" src="https://user-images.githubusercontent.com/31859223/156045132-406c6f6d-e287-4eff-8afb-19058688670e.png">
   <img width="1008" alt="Screenshot 2022-03-01 at 12 50 17 AM" src="https://user-images.githubusercontent.com/31859223/156045135-c78e4f93-c26a-4d2e-9d05-089e0ca88f4f.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