vtutrinov opened a new pull request, #7471:
URL: https://github.com/apache/ozone/pull/7471

   ## What changes were proposed in this pull request?
   Reset SCM leadership metric to null only in case the leader is not defined 
earlier on initializing the RAFT server
   
   When the SCM servers are in HA mode and start simultaneously leadership 
manages to settle down before the HTTP server starts. But the SCM main thread 
set the leadership to null with the suggestion the leadership is not defined 
yet, and the leadership will not be defined on prometheus metrics level:
   
   ```bash
   bash-5.1$ for scm in {scm1,scm2,scm3}; do echo ${scm} && curl -s 
http://${scm}:9876/prom | grep scmha_metrics_scmha_leader_state ; done
   scm1
   # TYPE scmha_metrics_scmha_leader_state gauge
   
scmha_metrics_scmha_leader_state{nodeid="a8b30f45-58b0-4ab2-b52b-9aae232ccc10",hostname="e8121b3ddde2"}
 0
   scm2
   # TYPE scmha_metrics_scmha_leader_state gauge
   
scmha_metrics_scmha_leader_state{nodeid="ae525b25-2774-4f91-9bbc-83884c1f472d",hostname="a467ff8d65d7"}
 0
   scm3
   # TYPE scmha_metrics_scmha_leader_state gauge
   
scmha_metrics_scmha_leader_state{nodeid="a5d83fc8-7fe3-4d49-b8f6-159e411bf0fa",hostname="2ea45cb6b00a"}
 0
   ```
   The PR suggests resetting the leadership metric to null only in case the 
leader is not defined earlier on initializing the RAFT server. Also, the HA 
mini-cluster was rewritten to imitate the simultaneous start of the SCM servers 
in HA mode
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-11742
   
   ## How was this patch tested?
   With existing integration tests after making changes for the Ozone HA 
mini-cluster
   


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