cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anim...@apache.org
Subject [2/4] git commit: updated refs/heads/4.3 to fd39184
Date Tue, 28 Jan 2014 22:06:38 GMT
CS-5950: Wrong storage tags are used for ISO deployed VMs.
(cherry picked from commit 1f4e2a51a42e566c11ab35cb38a81fd177feff16)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>


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

Branch: refs/heads/4.3
Commit: 3fa300b132fabd5a736d71a0509463d2e28f3537
Parents: d4a3f7b
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Mon Jan 27 14:18:53 2014 +0530
Committer: Animesh Chaturvedi <animesh@apache.org>
Committed: Tue Jan 28 13:25:14 2014 -0800

----------------------------------------------------------------------
 .../src/com/cloud/deploy/DeploymentPlanningManagerImpl.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3fa300b1/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 a41f5ee..21366f5 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -17,6 +17,7 @@
 package com.cloud.deploy;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -82,6 +83,7 @@ import com.cloud.org.Grouping;
 import com.cloud.resource.ResourceState;
 import com.cloud.storage.DiskOfferingVO;
 import com.cloud.storage.ScopeType;
+import com.cloud.storage.Storage;
 import com.cloud.storage.StorageManager;
 import com.cloud.storage.StoragePool;
 import com.cloud.storage.StoragePoolHostVO;
@@ -1216,8 +1218,12 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
             s_logger.debug("Calling StoragePoolAllocators to find suitable pools");
 
             DiskOfferingVO diskOffering = _diskOfferingDao.findById(toBeCreated.getDiskOfferingId());
-            DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType());
 
+            if (vmProfile.getTemplate().getFormat() == Storage.ImageFormat.ISO &&
vmProfile.getServiceOffering().getTagsArray().length != 0) {
+                diskOffering.setTagsArray(Arrays.asList(vmProfile.getServiceOffering().getTagsArray()));
+            }
+
+            DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType());
             boolean useLocalStorage = false;
             if (vmProfile.getType() != VirtualMachine.Type.User) {
                 String ssvmUseLocalStorage = _configDao.getValue(Config.SystemVMUseLocalStorage.key());


Mime
View raw message