Skip to content

Commit 117c8fe

Browse files
anshulgangwarDaanHoogland
authored andcommitted
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 2dc9e2c)
1 parent f26b6d0 commit 117c8fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,8 @@ private VolumeInfo copyVolume(StoragePool rootDiskPool, VolumeInfo volume, Virtu
724724
public VolumeInfo createVolumeOnPrimaryStorage(VirtualMachine vm, Volume rootVolumeOfVm, VolumeInfo volume, HypervisorType rootDiskHyperType) throws NoTransitionException {
725725
VirtualMachineTemplate rootDiskTmplt = _entityMgr.findById(VirtualMachineTemplate.class, vm.getTemplateId());
726726
DataCenter dcVO = _entityMgr.findById(DataCenter.class, vm.getDataCenterId());
727-
Pod pod = _entityMgr.findById(Pod.class, vm.getPodIdToDeployIn());
728727
StoragePoolVO rootDiskPool = _storagePoolDao.findById(rootVolumeOfVm.getPoolId());
728+
Pod pod = _entityMgr.findById(Pod.class, rootDiskPool.getPodId());
729729
ServiceOffering svo = _entityMgr.findById(ServiceOffering.class, vm.getServiceOfferingId());
730730
DiskOffering diskVO = _entityMgr.findById(DiskOffering.class, volume.getDiskOfferingId());
731731
Long clusterId = (rootDiskPool == null ? null : rootDiskPool.getClusterId());

0 commit comments

Comments
 (0)