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/06/16 07:24:29 UTC

[GitHub] [ozone] guihecheng opened a new pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

guihecheng opened a new pull request #2344:
URL: https://github.com/apache/ozone/pull/2344


   ## What changes were proposed in this pull request?
   
   Datandoe with low ratis log volume space should not be considered for new pipeline allocation.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-5269
   
   ## How was this patch tested?
   
   existing ut.
   a new ut for the case that there are not enough space for metadata volume.


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


[GitHub] [ozone] guihecheng commented on a change in pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
guihecheng commented on a change in pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#discussion_r655152182



##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -2901,4 +2901,15 @@
       directory deleting service per time interval.
     </description>
   </property>
+
+  <property>
+    <name>ozone.scm.datanode.ratis.volume.free-space.min</name>
+    <value>0MB</value>

Review comment:
       Oh, yes, will fix the default value and manually test smaller defaults for related tests, thanks~

##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java
##########
@@ -158,15 +161,21 @@ int currentPipelineCount(DatanodeDetails datanodeDetails, int nodesRequired) {
         ScmConfigKeys.OZONE_SCM_CONTAINER_SIZE_DEFAULT,
         StorageUnit.BYTES);
 
+    long metaSizeRequired = (long) conf.getStorageSize(
+        OZONE_DATANODE_RATIS_VOLUME_FREE_SPACE_MIN,
+        OZONE_DATANODE_RATIS_VOLUME_FREE_SPACE_MIN_DEFAULT,
+        StorageUnit.BYTES);
+
     // filter nodes that don't even have space for one container
     List<DatanodeDetails> canHoldList = healthyNodes.stream().filter(d ->
         hasEnoughSpace(d, sizeRequired)).collect(Collectors.toList());
 
     if (canHoldList.size() < nodesRequired) {
       msg = String.format("Pipeline creation failed due to no sufficient" +
-          " healthy datanodes with enough space for even a single container." +
-          " Required %d. Found %d. Container size %d.",
-          nodesRequired, canHoldList.size(), sizeRequired);
+          " healthy datanodes with enough space for container data or " +

Review comment:
       OK.




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


[GitHub] [ozone] bshashikant commented on a change in pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
bshashikant commented on a change in pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#discussion_r655138306



##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -2901,4 +2901,15 @@
       directory deleting service per time interval.
     </description>
   </property>
+
+  <property>
+    <name>ozone.scm.datanode.ratis.volume.free-space.min</name>
+    <value>0MB</value>

Review comment:
       We can change the default to 1GB but let's add a samller default for unit tests and acceptance tests as we did for container size(Set to 1GB for acceptance tests) so that we don't see any surprises later.

##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -2901,4 +2901,15 @@
       directory deleting service per time interval.
     </description>
   </property>
+
+  <property>
+    <name>ozone.scm.datanode.ratis.volume.free-space.min</name>
+    <value>0MB</value>

Review comment:
       We can change the default to 1GB but let's add a smaller default for unit tests and acceptance tests as we did for container size(Set to 1GB for acceptance tests) so that we don't see any surprises later.




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


[GitHub] [ozone] guihecheng commented on pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
guihecheng commented on pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#issuecomment-862141116


   Hi @bshashikant @ChenSammi , please help review this when you have time, thanks~


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


[GitHub] [ozone] ChenSammi commented on pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
ChenSammi commented on pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#issuecomment-866579631


   LGTM, + 1. 


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


[GitHub] [ozone] bshashikant commented on a change in pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
bshashikant commented on a change in pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#discussion_r655138306



##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -2901,4 +2901,15 @@
       directory deleting service per time interval.
     </description>
   </property>
+
+  <property>
+    <name>ozone.scm.datanode.ratis.volume.free-space.min</name>
+    <value>0MB</value>

Review comment:
       We can change the default to 1GB but let's add a samller default for unit tests and acceptance tests as we did for container size(Set to 1GB for acceptance tests) so that we don't see any surprises later.

##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -2901,4 +2901,15 @@
       directory deleting service per time interval.
     </description>
   </property>
+
+  <property>
+    <name>ozone.scm.datanode.ratis.volume.free-space.min</name>
+    <value>0MB</value>

Review comment:
       We can change the default to 1GB but let's add a smaller default for unit tests and acceptance tests as we did for container size(Set to 1GB for acceptance tests) so that we don't see any surprises later.




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


[GitHub] [ozone] ChenSammi commented on a change in pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
ChenSammi commented on a change in pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#discussion_r655137940



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java
##########
@@ -158,15 +161,21 @@ int currentPipelineCount(DatanodeDetails datanodeDetails, int nodesRequired) {
         ScmConfigKeys.OZONE_SCM_CONTAINER_SIZE_DEFAULT,
         StorageUnit.BYTES);
 
+    long metaSizeRequired = (long) conf.getStorageSize(
+        OZONE_DATANODE_RATIS_VOLUME_FREE_SPACE_MIN,
+        OZONE_DATANODE_RATIS_VOLUME_FREE_SPACE_MIN_DEFAULT,
+        StorageUnit.BYTES);
+
     // filter nodes that don't even have space for one container
     List<DatanodeDetails> canHoldList = healthyNodes.stream().filter(d ->
         hasEnoughSpace(d, sizeRequired)).collect(Collectors.toList());
 
     if (canHoldList.size() < nodesRequired) {
       msg = String.format("Pipeline creation failed due to no sufficient" +
-          " healthy datanodes with enough space for even a single container." +
-          " Required %d. Found %d. Container size %d.",
-          nodesRequired, canHoldList.size(), sizeRequired);
+          " healthy datanodes with enough space for container data or " +

Review comment:
       container data or metadata -> container data and metadata




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


[GitHub] [ozone] ChenSammi merged pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
ChenSammi merged pull request #2344:
URL: https://github.com/apache/ozone/pull/2344


   


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


[GitHub] [ozone] guihecheng commented on a change in pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
guihecheng commented on a change in pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#discussion_r655152182



##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -2901,4 +2901,15 @@
       directory deleting service per time interval.
     </description>
   </property>
+
+  <property>
+    <name>ozone.scm.datanode.ratis.volume.free-space.min</name>
+    <value>0MB</value>

Review comment:
       Oh, yes, will fix the default value and manually test smaller defaults for related tests, thanks~

##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java
##########
@@ -158,15 +161,21 @@ int currentPipelineCount(DatanodeDetails datanodeDetails, int nodesRequired) {
         ScmConfigKeys.OZONE_SCM_CONTAINER_SIZE_DEFAULT,
         StorageUnit.BYTES);
 
+    long metaSizeRequired = (long) conf.getStorageSize(
+        OZONE_DATANODE_RATIS_VOLUME_FREE_SPACE_MIN,
+        OZONE_DATANODE_RATIS_VOLUME_FREE_SPACE_MIN_DEFAULT,
+        StorageUnit.BYTES);
+
     // filter nodes that don't even have space for one container
     List<DatanodeDetails> canHoldList = healthyNodes.stream().filter(d ->
         hasEnoughSpace(d, sizeRequired)).collect(Collectors.toList());
 
     if (canHoldList.size() < nodesRequired) {
       msg = String.format("Pipeline creation failed due to no sufficient" +
-          " healthy datanodes with enough space for even a single container." +
-          " Required %d. Found %d. Container size %d.",
-          nodesRequired, canHoldList.size(), sizeRequired);
+          " healthy datanodes with enough space for container data or " +

Review comment:
       OK.




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


[GitHub] [ozone] guihecheng commented on pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
guihecheng commented on pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#issuecomment-865919639


   @bshashikant @ChenSammi updated as commented, thanks~


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


[GitHub] [ozone] ChenSammi commented on a change in pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
ChenSammi commented on a change in pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#discussion_r655131451



##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -2901,4 +2901,15 @@
       directory deleting service per time interval.
     </description>
   </property>
+
+  <property>
+    <name>ozone.scm.datanode.ratis.volume.free-space.min</name>
+    <value>0MB</value>

Review comment:
       0MB -> 1GB. 

##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java
##########
@@ -158,15 +161,21 @@ int currentPipelineCount(DatanodeDetails datanodeDetails, int nodesRequired) {
         ScmConfigKeys.OZONE_SCM_CONTAINER_SIZE_DEFAULT,
         StorageUnit.BYTES);
 
+    long metaSizeRequired = (long) conf.getStorageSize(
+        OZONE_DATANODE_RATIS_VOLUME_FREE_SPACE_MIN,
+        OZONE_DATANODE_RATIS_VOLUME_FREE_SPACE_MIN_DEFAULT,
+        StorageUnit.BYTES);
+
     // filter nodes that don't even have space for one container
     List<DatanodeDetails> canHoldList = healthyNodes.stream().filter(d ->
         hasEnoughSpace(d, sizeRequired)).collect(Collectors.toList());
 
     if (canHoldList.size() < nodesRequired) {
       msg = String.format("Pipeline creation failed due to no sufficient" +
-          " healthy datanodes with enough space for even a single container." +
-          " Required %d. Found %d. Container size %d.",
-          nodesRequired, canHoldList.size(), sizeRequired);
+          " healthy datanodes with enough space for container data or " +

Review comment:
       container data or metadata -> container data and metadata




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


[GitHub] [ozone] ChenSammi commented on a change in pull request #2344: HDDS-5269. Datandoe with low ratis log volume space should not be considered for new pipeline allocation.

Posted by GitBox <gi...@apache.org>.
ChenSammi commented on a change in pull request #2344:
URL: https://github.com/apache/ozone/pull/2344#discussion_r655131451



##########
File path: hadoop-hdds/common/src/main/resources/ozone-default.xml
##########
@@ -2901,4 +2901,15 @@
       directory deleting service per time interval.
     </description>
   </property>
+
+  <property>
+    <name>ozone.scm.datanode.ratis.volume.free-space.min</name>
+    <value>0MB</value>

Review comment:
       0MB -> 1GB. 




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