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/03/17 07:41:44 UTC

[GitHub] [ozone] bshashikant commented on a change in pull request #1989: HDDS-4899. Add SCM HA to Chaos tests.

bshashikant commented on a change in pull request #1989:
URL: https://github.com/apache/ozone/pull/1989#discussion_r595774817



##########
File path: hadoop-ozone/fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java
##########
@@ -382,4 +408,45 @@ public void shutdownHddsDatanode(DatanodeDetails dn) throws IOException {
   public boolean shouldStop(DatanodeDetails dn) {
     return !failedDnSet.contains(dn);
   }
+
+  // StorageContainerManager specific
+  public static int getNumberOfScmToFail() {
+    return 1;
+  }
+
+  public Set<StorageContainerManager> scmToFail() {
+    int numNodesToFail = getNumberOfScmToFail();
+    if (failedScmSet.size() >= numStorageContainerManagers/2) {
+      return Collections.emptySet();
+    }
+
+    int numOms = getStorageContainerManagersList().size();
+    Set<StorageContainerManager> scms = new HashSet<>();
+    for (int i = 0; i < numNodesToFail; i++) {
+      int failedNodeIndex = FailureManager.getBoundedRandomIndex(numOms);

Review comment:
       numOms--> numSCMs




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

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