GabrielBrascher commented on a change in pull request #3533: KVM local 
migration issue #3521
URL: https://github.com/apache/cloudstack/pull/3533#discussion_r311048538
 
 

 ##########
 File path: 
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
 ##########
 @@ -1905,6 +1911,23 @@ public void copyAsync(Map<VolumeInfo, DataStore> 
volumeDataStoreMap, VirtualMach
         }
     }
 
+    /**
+     * Returns true if at least one of the entries on the map 
'volumeDataStoreMap' has both source and destination storage pools of Network 
Filesystem (NFS).
+     */
+    protected boolean isSourceAndDestinationPoolTypeOfNfs(Map<VolumeInfo, 
DataStore> volumeDataStoreMap) {
+        for (Map.Entry<VolumeInfo, DataStore> entry : 
volumeDataStoreMap.entrySet()) {
+            VolumeInfo srcVolumeInfo = entry.getKey();
+            DataStore destDataStore = entry.getValue();
+
+            StoragePoolVO destStoragePool = 
_storagePoolDao.findById(destDataStore.getId());
+            StoragePoolVO sourceStoragePool = 
_storagePoolDao.findById(srcVolumeInfo.getPoolId());
+            if (sourceStoragePool.getPoolType() == 
StoragePoolType.NetworkFilesystem && destStoragePool.getPoolType() == 
StoragePoolType.NetworkFilesystem) {
 
 Review comment:
   @rhtyd The idea is that if at least one of the disks is NFS it cannot be 
migrated on the execution flow of local storage. Taking a second look I see 
that the method name might need enhancements.
   
   Am I missing something? Please let me know if something doesn't look right. 
Thanks for the review.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to