Repository: cloudstack
Updated Branches:
  refs/heads/master f2ccee7a0 -> c5399cdef


CLOUDSTACK-7559 After migrating root volume to other cluster wide storage, 
start VM is not running the VM with root disk from new storage.

Changes:
- During VM start, do not use the last host Id, if the host's cluster does not 
match the cluster provided in the deployment plan.


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

Branch: refs/heads/master
Commit: 48553d7434898909b392c2d4c75f3e3044019508
Parents: f2ccee7
Author: Prachi Damle <prachi.da...@citrix.com>
Authored: Mon Nov 17 20:27:01 2014 -0800
Committer: Prachi Damle <prachi.da...@citrix.com>
Committed: Tue Nov 18 09:47:20 2014 -0800

----------------------------------------------------------------------
 server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48553d74/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java 
b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index 6b80dba..e6c3f3a 100755
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -372,6 +372,10 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> 
{
                 s_logger.debug("The last host of this VM cannot be found");
             } else if (avoids.shouldAvoid(host)) {
                 s_logger.debug("The last host of this VM is in avoid set");
+            } else if (plan.getClusterId() != null && host.getClusterId() != 
null
+                    && !plan.getClusterId().equals(host.getClusterId())) {
+                s_logger.debug("The last host of this VM cannot be picked as 
the plan specifies different clusterId: "
+                        + plan.getClusterId());
             } else if (_capacityMgr.checkIfHostReachMaxGuestLimit(host)) {
                 s_logger.debug("The last Host, hostId: " + host.getId() +
                         " already has max Running VMs(count includes system 
VMs), skipping this and trying other available hosts");

Reply via email to