Repository: cloudstack
Updated Branches:
  refs/heads/4.4 f26b6d0a7 -> a951b5152


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 2dc9e2c530b36efc4c4684e13ae0412103925d05)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/117c8fe5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/117c8fe5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/117c8fe5

Branch: refs/heads/4.4
Commit: 117c8fe5b0e1b9f1045cbf65e3285fbf205770bf
Parents: f26b6d0
Author: Anshul Gangwar <[email protected]>
Authored: Thu Jun 12 13:54:56 2014 +0530
Committer: Daan Hoogland <[email protected]>
Committed: Fri Jun 13 12:38:14 2014 +0200

----------------------------------------------------------------------
 .../apache/cloudstack/engine/orchestration/VolumeOrchestrator.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/117c8fe5/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
----------------------------------------------------------------------
diff --git 
a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
 
b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
index 064ffca..b6fecfb 100644
--- 
a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
+++ 
b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
@@ -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());

Reply via email to