vmware: fix NPE for volume migration CLUSTER to ZONE-wide pool (#5582)

Scope type of source pool is passed in the method, incorrectly, instead of the target pool.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
(cherry picked from commit 330e8e6e9d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Abhishek Kumar 2021-10-17 06:54:41 +05:30 committed by Rohit Yadav
parent 4aaa850b63
commit f9ca9686b2
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ public class VmwareStorageMotionStrategy implements DataMotionStrategy {
if (hostId == null) {
throw new CloudRuntimeException("Offline Migration failed, unable to find suitable host for worker VM placement in the cluster of storage pool: " + sourcePool.getName());
}
hostGuidInTargetCluster = getHostGuidInTargetCluster(sourcePool.getClusterId(), targetPool, sourceScopeType);
hostGuidInTargetCluster = getHostGuidInTargetCluster(sourcePool.getClusterId(), targetPool, targetScopeType);
} else if (ScopeType.CLUSTER.equals(targetScopeType)) {
hostId = findSuitableHostIdForWorkerVmPlacement(targetPool.getClusterId());
if (hostId == null) {