You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2014/01/28 13:59:18 UTC
git commit: updated refs/heads/4.3-forward to 1f4e2a5
Updated Branches:
refs/heads/4.3-forward e8ba2d085 -> 1f4e2a51a
CS-5950: Wrong storage tags are used for ISO deployed VMs.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1f4e2a51
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1f4e2a51
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1f4e2a51
Branch: refs/heads/4.3-forward
Commit: 1f4e2a51a42e566c11ab35cb38a81fd177feff16
Parents: e8ba2d0
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Mon Jan 27 14:18:53 2014 +0530
Committer: Sanjay Tripathi <sa...@citrix.com>
Committed: Tue Jan 28 14:11:20 2014 +0530
----------------------------------------------------------------------
.../src/com/cloud/deploy/DeploymentPlanningManagerImpl.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f4e2a51/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 9c3aa97..0a25805 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;
@@ -91,6 +92,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;
@@ -1215,8 +1217,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());