You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2014/06/07 01:36:57 UTC

git commit: updated refs/heads/master to 3b3f457

Repository: cloudstack
Updated Branches:
  refs/heads/master 36ec16e4f -> 3b3f4577b


CLOUDSTACK-6476: Basic Zone with Multiple Pods Setup: DHCP server doesnt get deployed in the pod where the VM gets deployed

Changes:
PodId in which the router should get started was not being saved to the DB due to the VO's setter method not following the setXXX format. So when planner loaded the router from DB, it always got podId as null and that would allow planner to deploy the router in any pod. If the router happens to start in a different pod than the user VM, the Vm fails to start since the Dhcp service check fails.

Fixed the VO's setPodId method, that was causing the DB save operation fail.


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

Branch: refs/heads/master
Commit: 3b3f4577b0f4a86cc6f26a9999a14621d3aba37a
Parents: 36ec16e
Author: Prachi Damle <pr...@cloud.com>
Authored: Fri May 16 16:48:53 2014 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Fri Jun 6 16:15:31 2014 -0700

----------------------------------------------------------------------
 .../src/com/cloud/vm/VirtualMachineManagerImpl.java            | 6 +++---
 engine/schema/src/com/cloud/vm/VMInstanceVO.java               | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b3f4577/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 8ca7d1e..25c67db 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -387,7 +387,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
 
         vm.setDataCenterId(plan.getDataCenterId());
         if (plan.getPodId() != null) {
-            vm.setPodId(plan.getPodId());
+            vm.setPodIdToDeployIn(plan.getPodId());
         }
         assert (plan.getClusterId() == null && plan.getPoolId() == null) : "We currently don't support cluster and pool preset yet";
         final VMInstanceVO vmFinal = _vmDao.persist(vm);
@@ -949,7 +949,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
                 }
 
                 long destHostId = dest.getHost().getId();
-                vm.setPodId(dest.getPod().getId());
+                vm.setPodIdToDeployIn(dest.getPod().getId());
                 Long cluster_id = dest.getCluster().getId();
                 ClusterDetailsVO cluster_detail_cpu = _clusterDetailsDao.findDetail(cluster_id, "cpuOvercommitRatio");
                 ClusterDetailsVO cluster_detail_ram = _clusterDetailsDao.findDetail(cluster_id, "memoryOvercommitRatio");
@@ -1729,7 +1729,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
 
                 //when start the vm next time, don;'t look at last_host_id, only choose the host based on volume/storage pool
                 vm.setLastHostId(null);
-                vm.setPodId(destPool.getPodId());
+                vm.setPodIdToDeployIn(destPool.getPodId());
             } else {
                 s_logger.debug("Storage migration failed");
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b3f4577/engine/schema/src/com/cloud/vm/VMInstanceVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/VMInstanceVO.java b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
index d1f358d..c1190dc 100644
--- a/engine/schema/src/com/cloud/vm/VMInstanceVO.java
+++ b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
@@ -422,7 +422,7 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
         return podIdToDeployIn;
     }
 
-    public void setPodId(Long podId) {
+    public void setPodIdToDeployIn(Long podId) {
         this.podIdToDeployIn = podId;
     }