adoroszlai commented on code in PR #8331:
URL: https://github.com/apache/ozone/pull/8331#discussion_r2096963203


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/DataNodeSafeModeRule.java:
##########
@@ -66,7 +69,17 @@ protected boolean validate() {
     if (validateBasedOnReportProcessing()) {
       return registeredDns >= requiredDns;
     }
-    return nodeManager.getNodes(NodeStatus.inServiceHealthy()).size() >= 
requiredDns;
+
+    int healthyCount = 
nodeManager.getNodes(NodeStatus.inServiceHealthy()).size();
+    int healthyReadOnlyCount = 
nodeManager.getNodes(NodeStatus.inServiceHealthyReadOnly()).size();
+    int staleCount = nodeManager.getNodes(NodeStatus.inServiceStale()).size();
+
+    if (healthyCount + healthyReadOnlyCount + staleCount == 1) {
+      LOG.warn("Only one Datanode is available in the cluster. " +
+          "Consider setting 'hdds.scm.safemode.min.datanode=1' in the 
configuration.");
+    }

Review Comment:
   I guess we can remove the warning, unless @nandakumar131 has some other 
suggestion.



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