rafaelweingartner commented on a change in pull request #2500: Restrict the 
number of managed clustered file systems per compute cluster
URL: https://github.com/apache/cloudstack/pull/2500#discussion_r214223982
 
 

 ##########
 File path: 
engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
 ##########
 @@ -100,34 +100,41 @@
             if (filter(avoid, storagePool, dskCh, plan)) {
                 suitablePools.add(storagePool);
             } else {
-                avoid.addPool(storagePool.getId());
+                if (isAddStoragePoolToAvoidSet(storage)) {
+                    avoid.addPool(storagePool.getId());
+                }
             }
         }
         return suitablePools;
     }
 
+    // Don't add zone-wide, managed storage to the avoid list because it may 
be usable for another cluster.
+    private boolean isAddStoragePoolToAvoidSet(StoragePoolVO storagePoolVO) {
 
 Review comment:
   What about `can...` instead of `is...`?
   Also, what about a different sentence as the documentation/comment?
   `Zone-wide or non-managed storage systems should be added to the avoid list 
because they might be usable by other clusters` 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to