GabrielBrascher commented on a change in pull request #2983: KVM live storage 
migration intra cluster from NFS source and destination
URL: https://github.com/apache/cloudstack/pull/2983#discussion_r252637922
 
 

 ##########
 File path: 
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
 ##########
 @@ -2046,6 +2207,46 @@ private void 
verifyLiveMigrationMapForKVM(Map<VolumeInfo, DataStore> volumeDataS
             if (destStoragePoolVO == null) {
                 throw new CloudRuntimeException("Destination storage pool with 
ID " + dataStore.getId() + " was not located.");
             }
+
+            if (storageTypeConsistency == null) {
+                storageTypeConsistency = destStoragePoolVO.isManaged();
+            } else if (storageTypeConsistency != 
destStoragePoolVO.isManaged()) {
+                throw new CloudRuntimeException("Destination storage pools 
must be either all managed or all not managed");
+            }
+
+            if (!destStoragePoolVO.isManaged()) {
+                if (destStoragePoolVO.getScope() != ScopeType.CLUSTER) {
 
 Review comment:
   In the case of local storage migration, the storage pool scope type is of 
`ScopeType.HOST;` therefore, this is also breaking for local storage migration, 
throwing the exception `CloudRuntimeException`.

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


With regards,
Apache Git Services

Reply via email to