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 | ||||
| 	 * @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 | ||||
|  | ||||
| @ -1553,10 +1553,11 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag | ||||
|     } | ||||
| 
 | ||||
|     @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 | ||||
|     	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); | ||||
|     	dskCh.setHyperType(dataDiskHyperType); | ||||
|     	DataCenterVO destPoolDataCenter = _dcDao.findById(destPoolDcId); | ||||
|     	HostPodVO destPoolPod = _podDao.findById(destPoolPodId); | ||||
|         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) { | ||||
|     		// 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(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user