cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [3/3] git commit: updated refs/heads/master to eb7cd06
Date Fri, 06 Dec 2013 19:51:33 GMT
CLOUDSTACK-5401: VM migration during host maintenance fails if pool.storage.capacity.disablethreshold
is lowered

Changes:
- During Vm migration while finding a new host within the cluster, we need to set the storagepool
Id to the deployment plan too.
- This will indicate the planner that the volumes are ready and no need to find new pool
- This in turn will prevent the threshold check done during the pool allocation. This step
is not needed since there is no need to allocate pools newly.
- Thus the migration wont fail because th threshold check fails.


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

Branch: refs/heads/master
Commit: eb7cd06e190f9ad7eb74b1f52814a4f90776bcad
Parents: 5475312
Author: Prachi Damle <prachi@cloud.com>
Authored: Fri Dec 6 11:12:38 2013 -0800
Committer: Prachi Damle <prachi@cloud.com>
Committed: Fri Dec 6 11:18:28 2013 -0800

----------------------------------------------------------------------
 .../src/com/cloud/vm/VirtualMachineManagerImpl.java       | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb7cd06e/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index d4bbbe6..d0d0481 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -2054,8 +2054,16 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
         }
 
         Host host = _hostDao.findById(hostId);
+        Long poolId = null;
+        List<VolumeVO> vols = _volsDao.findReadyRootVolumesByInstance(vm.getId());
+        for (VolumeVO rootVolumeOfVm : vols) {
+            StoragePoolVO rootDiskPool = _storagePoolDao.findById(rootVolumeOfVm.getPoolId());
+            if (rootDiskPool != null) {
+                poolId = rootDiskPool.getId();
+            }
+        }
 
-        DataCenterDeployment plan = new DataCenterDeployment(host.getDataCenterId(), host.getPodId(),
host.getClusterId(), null, null, null);
+        DataCenterDeployment plan = new DataCenterDeployment(host.getDataCenterId(), host.getPodId(),
host.getClusterId(), null, poolId, null);
         ExcludeList excludes = new ExcludeList();
         excludes.addHost(hostId);
 


Mime
View raw message