cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [1/4] git commit: updated refs/heads/4.3 to d3520a5
Date Fri, 06 Dec 2013 21:20:17 GMT
Updated Branches:
  refs/heads/4.3 a2c0abe98 -> d3520a5d1


CLOUDSTACK-5140: A stopped vm cant start after disable threshold has been reached on the storage
pool

Changes:
- Do not do the stoarge capacity check for a VM having READY Volumes that are already present
on the storagepool.

Conflicts:

	server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java

Conflicts:

	server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java


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

Branch: refs/heads/4.3
Commit: 5c984eaef8385c5022127fbad43b74f6bc147050
Parents: a2c0abe
Author: Prachi Damle <prachi@cloud.com>
Authored: Fri Dec 6 12:45:33 2013 -0800
Committer: Prachi Damle <prachi@cloud.com>
Committed: Fri Dec 6 13:18:34 2013 -0800

----------------------------------------------------------------------
 .../cloud/deploy/DeploymentPlanningManagerImpl.java  | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5c984eae/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 6e441a9..5d5258b 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -308,7 +308,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
                     List<Host> suitableHosts = new ArrayList<Host>();
                     suitableHosts.add(host);
                     Pair<Host, Map<Volume, StoragePool>> potentialResources =
findPotentialDeploymentResources(
-                            suitableHosts, suitableVolumeStoragePools, avoids, getPlannerUsage(planner,vmProfile,
plan ,avoids));
+                            suitableHosts, suitableVolumeStoragePools, avoids, getPlannerUsage(planner,vmProfile,
plan ,avoids), readyAndReusedVolumes);
                     if (potentialResources != null) {
                         Pod pod = _podDao.findById(host.getPodId());
                         Cluster cluster = _clusterDao.findById(host.getClusterId());
@@ -369,7 +369,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
                             List<Host> suitableHosts = new ArrayList<Host>();
                             suitableHosts.add(host);
                             Pair<Host, Map<Volume, StoragePool>> potentialResources
= findPotentialDeploymentResources(
-                                    suitableHosts, suitableVolumeStoragePools, avoids, getPlannerUsage(planner,vmProfile,
plan ,avoids));
+                                    suitableHosts, suitableVolumeStoragePools, avoids, getPlannerUsage(planner,vmProfile,
plan ,avoids), readyAndReusedVolumes);
                             if (potentialResources != null) {
                                 Pod pod = _podDao.findById(host.getPodId());
                                 Cluster cluster = _clusterDao.findById(host.getClusterId());
@@ -886,7 +886,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
                 // choose the potential host and pool for the VM
                 if (!suitableVolumeStoragePools.isEmpty()) {
                     Pair<Host, Map<Volume, StoragePool>> potentialResources =
findPotentialDeploymentResources(
-                            suitableHosts, suitableVolumeStoragePools, avoid, resourceUsageRequired);
+                            suitableHosts, suitableVolumeStoragePools, avoid, resourceUsageRequired,
readyAndReusedVolumes);
 
                     if (potentialResources != null) {
                         Pod pod = _podDao.findById(clusterVO.getPodId());
@@ -1014,11 +1014,16 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
     }
     protected Pair<Host, Map<Volume, StoragePool>> findPotentialDeploymentResources(List<Host>
suitableHosts,
             Map<Volume, List<StoragePool>> suitableVolumeStoragePools, ExcludeList
avoid,
-            DeploymentPlanner.PlannerResourceUsage resourceUsageRequired) {
+            DeploymentPlanner.PlannerResourceUsage resourceUsageRequired, List<Volume>
readyAndReusedVolumes) {
         s_logger.debug("Trying to find a potenial host and associated storage pools from
the suitable host/pool lists for this VM");
 
         boolean hostCanAccessPool = false;
         boolean haveEnoughSpace = false;
+
+        if (readyAndReusedVolumes == null) {
+            readyAndReusedVolumes = new ArrayList<Volume>();
+        }
+
         Map<Volume, StoragePool> storage = new HashMap<Volume, StoragePool>();
         TreeSet<Volume> volumesOrderBySizeDesc = new TreeSet<Volume>(new Comparator<Volume>()
{
             @Override
@@ -1042,7 +1047,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
                 for (StoragePool potentialSPool : volumePoolList) {
                     if (hostCanAccessSPool(potentialHost, potentialSPool)) {
                         hostCanAccessPool = true;
-                        if (multipleVolume) {
+                        if (multipleVolume && !readyAndReusedVolumes.contains(vol))
{
                             List<Volume> requestVolumes = null;
                             if (volumeAllocationMap.containsKey(potentialSPool))
                                 requestVolumes = volumeAllocationMap.get(potentialSPool);


Mime
View raw message