mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
moveVolume is broken due to not setup hypervisortype in dskch
fixed
This commit is contained in:
parent
a1855ebb27
commit
f865e8b061
@ -181,7 +181,7 @@ public interface StorageManager extends Manager {
|
|||||||
* @param destPoolClusterId
|
* @param destPoolClusterId
|
||||||
* @return VolumeVO
|
* @return VolumeVO
|
||||||
*/
|
*/
|
||||||
VolumeVO moveVolume(VolumeVO volume, long destPoolDcId, Long destPoolPodId, Long destPoolClusterId);
|
VolumeVO moveVolume(VolumeVO volume, long destPoolDcId, Long destPoolPodId, Long destPoolClusterId, HypervisorType dataDiskHyperType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a volume based on the given criteria
|
* Create a volume based on the given criteria
|
||||||
|
|||||||
@ -1553,10 +1553,11 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VolumeVO moveVolume(VolumeVO volume, long destPoolDcId, Long destPoolPodId, Long destPoolClusterId) {
|
public VolumeVO moveVolume(VolumeVO volume, long destPoolDcId, Long destPoolPodId, Long destPoolClusterId, HypervisorType dataDiskHyperType) {
|
||||||
// Find a destination storage pool with the specified criteria
|
// Find a destination storage pool with the specified criteria
|
||||||
DiskOfferingVO diskOffering = _diskOfferingDao.findById(volume.getDiskOfferingId());
|
DiskOfferingVO diskOffering = _diskOfferingDao.findById(volume.getDiskOfferingId());
|
||||||
DiskProfile dskCh = new DiskProfile(volume.getId(), volume.getVolumeType(), volume.getName(), diskOffering.getId(), diskOffering.getDiskSizeInBytes(), diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(), diskOffering.isRecreatable(), null);
|
DiskProfile dskCh = new DiskProfile(volume.getId(), volume.getVolumeType(), volume.getName(), diskOffering.getId(), diskOffering.getDiskSizeInBytes(), diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(), diskOffering.isRecreatable(), null);
|
||||||
|
dskCh.setHyperType(dataDiskHyperType);
|
||||||
DataCenterVO destPoolDataCenter = _dcDao.findById(destPoolDcId);
|
DataCenterVO destPoolDataCenter = _dcDao.findById(destPoolDcId);
|
||||||
HostPodVO destPoolPod = _podDao.findById(destPoolPodId);
|
HostPodVO destPoolPod = _podDao.findById(destPoolPodId);
|
||||||
StoragePoolVO destPool = findStoragePool(dskCh, destPoolDataCenter, destPoolPod, destPoolClusterId, null, null, null, new HashSet<StoragePool>());
|
StoragePoolVO destPool = findStoragePool(dskCh, destPoolDataCenter, destPoolPod, destPoolClusterId, null, null, null, new HashSet<StoragePool>());
|
||||||
|
|||||||
@ -552,7 +552,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||||||
|
|
||||||
if (moveVolumeNeeded) {
|
if (moveVolumeNeeded) {
|
||||||
// Move the volume to a storage pool in the VM's zone, pod, or cluster
|
// Move the volume to a storage pool in the VM's zone, pod, or cluster
|
||||||
volume = _storageMgr.moveVolume(volume, vmRootVolumePool.getDataCenterId(), vmRootVolumePool.getPodId(), vmRootVolumePool.getClusterId());
|
volume = _storageMgr.moveVolume(volume, vmRootVolumePool.getDataCenterId(), vmRootVolumePool.getPodId(), vmRootVolumePool.getClusterId(), dataDiskHyperType);
|
||||||
}
|
}
|
||||||
|
|
||||||
AsyncJobExecutor asyncExecutor = BaseAsyncJobExecutor.getCurrentExecutor();
|
AsyncJobExecutor asyncExecutor = BaseAsyncJobExecutor.getCurrentExecutor();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user