GabrielBrascher commented on a change in pull request #2997: Allow KVM VM live 
migration with ROOT volume on file storage type
URL: https://github.com/apache/cloudstack/pull/2997#discussion_r233310484
 
 

 ##########
 File path: 
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
 ##########
 @@ -1803,6 +1823,42 @@ public void copyAsync(Map<VolumeInfo, DataStore> 
volumeDataStoreMap, VirtualMach
         }
     }
 
+    /**
+     * Returns true. This method was implemented considering the classes that 
extend this {@link StorageSystemDataMotionStrategy} and cannot migrate volumes 
from certain types of source storage pools and/or to a different kind of 
destiny storage pool.
+     */
+    protected boolean shouldMigrateVolume(StoragePoolVO sourceStoragePool, 
Host destHost, StoragePoolVO destStoragePool) {
+        return true;
 
 Review comment:
   Always returns true to keep the original execution flow.
   @nvazquez note that this implementation might be useful for you. I added 
destHost and destStoragePool thinking on a useful verification for you. One can 
use this method to check if the source and target storage pool are the same, 
for instance when migrating among shared pools. However, I can remove these 
variables (not used for now), if you think it is better to not use this way.

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


With regards,
Apache Git Services

Reply via email to