abh1sar commented on code in PR #12966:
URL: https://github.com/apache/cloudstack/pull/12966#discussion_r3061547453


##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -1043,6 +1043,36 @@ public boolean validateVolumeSizeInBytes(long size) {
         return true;
     }
 
+    private VolumeVO createVolumeOnStoragePool(Long volumeId, Long storageId) 
throws ExecutionException, InterruptedException {
+        VolumeVO volume = _volsDao.findById(volumeId);
+        StoragePool destPool = (StoragePool) 
dataStoreMgr.getDataStore(storageId, DataStoreRole.Primary);
+        if (destPool == null) {
+            throw new InvalidParameterValueException("Failed to find the 
destination storage pool: " + storageId);
+        } else if (destPool.isInMaintenance()) {

Review Comment:
   Good point. Only allowing for `Up` storage pool now.



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

Reply via email to