mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6897: when we try to attach the uploaded/allocated volume to a VM on zwps, then we were passing the podId of VM instead of storage pool to storage allocator. This resulting in use of Clusterscope storage allocator, allocating a storage pool for VM on zwps beacuse of pod id not null. This was resulting in scope conflict later
(cherry picked from commit 2dc9e2c530)
This commit is contained in:
parent
f26b6d0a78
commit
117c8fe5b0
|
|
@ -724,8 +724,8 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
|
|||
public VolumeInfo createVolumeOnPrimaryStorage(VirtualMachine vm, Volume rootVolumeOfVm, VolumeInfo volume, HypervisorType rootDiskHyperType) throws NoTransitionException {
|
||||
VirtualMachineTemplate rootDiskTmplt = _entityMgr.findById(VirtualMachineTemplate.class, vm.getTemplateId());
|
||||
DataCenter dcVO = _entityMgr.findById(DataCenter.class, vm.getDataCenterId());
|
||||
Pod pod = _entityMgr.findById(Pod.class, vm.getPodIdToDeployIn());
|
||||
StoragePoolVO rootDiskPool = _storagePoolDao.findById(rootVolumeOfVm.getPoolId());
|
||||
Pod pod = _entityMgr.findById(Pod.class, rootDiskPool.getPodId());
|
||||
ServiceOffering svo = _entityMgr.findById(ServiceOffering.class, vm.getServiceOfferingId());
|
||||
DiskOffering diskVO = _entityMgr.findById(DiskOffering.class, volume.getDiskOfferingId());
|
||||
Long clusterId = (rootDiskPool == null ? null : rootDiskPool.getClusterId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue