This is an automated email from the ASF dual-hosted git repository.

nvazquez pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.16 by this push:
     new f8b648b  Fix migration of VM with volume on Ubuntu (#6116)
f8b648b is described below

commit f8b648b9382c256c49e7928cc37b450962f8b14c
Author: Pearl Dsilva <[email protected]>
AuthorDate: Mon Mar 21 07:44:24 2022 +0530

    Fix migration of VM with volume on Ubuntu (#6116)
    
    * Fix migration of VM with volume on Ubuntu
    
    * address comment
---
 .../storage/motion/KvmNonManagedStorageDataMotionStrategy.java      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java
 
b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java
index 3046cd4..c96ced9 100644
--- 
a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java
+++ 
b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java
@@ -82,10 +82,12 @@ public class KvmNonManagedStorageDataMotionStrategy extends 
StorageSystemDataMot
      */
     @Override
     protected StrategyPriority internalCanHandle(Map<VolumeInfo, DataStore> 
volumeMap, Host srcHost, Host destHost) {
-        if (super.internalCanHandle(volumeMap, srcHost, destHost) != 
StrategyPriority.CANT_HANDLE
-                || canHandleKVMNonManagedLiveNFSStorageMigration(volumeMap, 
srcHost, destHost) != StrategyPriority.CANT_HANDLE) {
+        if (super.internalCanHandle(volumeMap, srcHost, destHost) != 
StrategyPriority.CANT_HANDLE) {
             return StrategyPriority.CANT_HANDLE;
         }
+        if (canHandleKVMNonManagedLiveNFSStorageMigration(volumeMap, srcHost, 
destHost) != StrategyPriority.CANT_HANDLE) {
+            return StrategyPriority.HYPERVISOR;
+        }
 
         Set<VolumeInfo> volumeInfoSet = volumeMap.keySet();
         for (VolumeInfo volumeInfo : volumeInfoSet) {

Reply via email to