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


##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -1043,6 +1043,17 @@ public boolean validateVolumeSizeInBytes(long size) {
         return true;
     }
 
+    private VolumeVO allocateVolumeOnStorage(Long volumeId, Long storageId) 
throws ExecutionException, InterruptedException {
+        DataStore destStore = dataStoreMgr.getDataStore(storageId, 
DataStoreRole.Primary);
+        VolumeInfo destVolume = volFactory.getVolume(volumeId, destStore);
+        AsyncCallFuture<VolumeApiResult> createVolumeFuture = 
volService.createVolumeAsync(destVolume, destStore);
+        VolumeApiResult createVolumeResult = createVolumeFuture.get();
+        if (createVolumeResult.isFailed()) {
+            throw new CloudRuntimeException("Creation of a dest volume failed: 
" + createVolumeResult.getResult());
+        }
+        return _volsDao.findById(destVolume.getId());

Review Comment:
   storageMgr.checkIfReadyVolumeFitsInStoragePoolWithStorageAccessGroups is 
used for migration. Added other checks regarding maintenance mode, disk 
offering and zone



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