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/11/18 19:10:15 UTC

[1/2] git commit: updated refs/heads/master to c5399cd

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 <pr...@citrix.com>
Authored: Mon Nov 17 20:27:01 2014 -0800
Committer: Prachi Damle <pr...@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");


[2/2] git commit: updated refs/heads/master to c5399cd

Posted by pr...@apache.org.
CLOUDSTACK-5853 cannot deploy vm with differing service storage tag and data disk storage tag

Changes:
- Reverting Marcus's fix since this issue has already fixed by https://issues.apache.org/jira/browse/CLOUDSTACK-5426


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

Branch: refs/heads/master
Commit: c5399cdef07cd762d80ae1d26bfbb8a474f9f19b
Parents: 48553d7
Author: Prachi Damle <pr...@citrix.com>
Authored: Mon Nov 17 20:27:41 2014 -0800
Committer: Prachi Damle <pr...@citrix.com>
Committed: Tue Nov 18 09:47:23 2014 -0800

----------------------------------------------------------------------
 api/src/com/cloud/deploy/DeploymentPlanner.java                | 5 -----
 .../storage/allocator/ClusterScopeStoragePoolAllocator.java    | 6 ------
 .../storage/allocator/ZoneWideStoragePoolAllocator.java        | 5 -----
 3 files changed, 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c5399cde/api/src/com/cloud/deploy/DeploymentPlanner.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/deploy/DeploymentPlanner.java b/api/src/com/cloud/deploy/DeploymentPlanner.java
index eb62cb1..dc7ea6d 100644
--- a/api/src/com/cloud/deploy/DeploymentPlanner.java
+++ b/api/src/com/cloud/deploy/DeploymentPlanner.java
@@ -176,11 +176,6 @@ public interface DeploymentPlanner extends Adapter {
             _poolIds.add(poolId);
         }
 
-        public void removePool(long poolId) {
-            if (_poolIds != null) {
-                _poolIds.remove(poolId);
-            }
-        }
 
         public void addDataCenter(long dataCenterId) {
             if (_dcIds == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c5399cde/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
index ea084c7..0f4df4f 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
@@ -86,12 +86,6 @@ public class ClusterScopeStoragePoolAllocator extends AbstractStoragePoolAllocat
             avoid.addPool(pool.getId());
         }
 
-        // make sure our matching pool was not in avoid set
-        for (StoragePoolVO pool : pools) {
-            s_logger.debug("Removing pool " + pool + " from avoid set, must have been inserted when searching for another disk's tag");
-            avoid.removePool(pool.getId());
-        }
-
         if (pools.size() == 0) {
             if (s_logger.isDebugEnabled()) {
                 s_logger.debug("No storage pools available for " + ServiceOffering.StorageType.shared.toString() + " volume allocation, returning");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c5399cde/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
index f9abfde..b38b76f 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -80,11 +80,6 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator {
             avoid.addPool(pool.getId());
         }
 
-        // make sure our matching pool was not in avoid set
-        for (StoragePoolVO pool : storagePoolsByHypervisor) {
-            s_logger.debug("Removing pool " + pool + " from avoid set, must have been inserted when searching for another disk's tag");
-            avoid.removePool(pool.getId());
-        }
 
         for (StoragePoolVO storage : storagePools) {
             if (suitablePools.size() == returnUpTo) {