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

 ##########
 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:
   @GabrielBrascher shouldn't it loop and check for all volumes before 
returning true? It could be like it can return false if any of the src/dest 
pools are not nfs

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to