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 2013/07/19 00:58:11 UTC

git commit: updated refs/heads/4.2 to 3fc43cf

Updated Branches:
  refs/heads/4.2 66a68552d -> 3fc43cf28


CLOUDSTACK-3451 Parallel deployment - Xenserver - When deploying 30 Vms in parallel, some of the Vm deployment fails when “applying dhcp entry/applying userdata and password entry on router” and retry eventually happens when they succeed.

Changes:
- Passing the avoid set generated by the first pass of deployment to the second try.
- The second try is done, when the first pass that uses a reserved plan fails to deploy on the reserved host, to search over the entire zone again


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

Branch: refs/heads/4.2
Commit: 3fc43cf281dacebf4bee29069b7013599b1b5783
Parents: 66a6855
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Jul 18 00:26:38 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Jul 18 15:57:13 2013 -0700

----------------------------------------------------------------------
 .../engine/cloud/entity/api/VMEntityManagerImpl.java      | 10 ++++++++--
 server/src/com/cloud/vm/VirtualMachineManagerImpl.java    |  7 ++++++-
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3fc43cf2/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
index 8336c3f..ffb7dc5 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
@@ -115,6 +115,7 @@ public class VMEntityManagerImpl implements VMEntityManager {
     @Inject
     protected AffinityGroupVMMapDao _affinityGroupVMMapDao;
 
+
 	@Override
 	public VMEntityVO loadVirtualMachine(String vmId) {
 		// TODO Auto-generated method stub
@@ -197,7 +198,6 @@ public class VMEntityManagerImpl implements VMEntityManager {
                     if (s_logger.isDebugEnabled()) {
                         s_logger.debug("Cannot finalize the VM reservation for this destination found, retrying");
                     }
-
                     exclude.addHost(dest.getHost().getId());
                     continue;
                 }
@@ -228,8 +228,14 @@ public class VMEntityManagerImpl implements VMEntityManager {
                         _accountDao.findById(vm.getAccountId()), reservedPlan);
             } catch (Exception ex) {
                 // Retry the deployment without using the reservation plan
+                DataCenterDeployment plan = new DataCenterDeployment(0, null, null, null, null, null);
+
+                if (reservedPlan.getAvoids() != null) {
+                    plan.setAvoids(reservedPlan.getAvoids());
+                }
+
                 _itMgr.start(vm, params, _userDao.findById(new Long(caller)), _accountDao.findById(vm.getAccountId()),
-                        null);
+                        plan);
             }
         } else {
             // no reservation found. Let VirtualMachineManager retry

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3fc43cf2/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 9365e1b..02e6d8b 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -788,10 +788,11 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
         HypervisorGuru hvGuru = _hvGuruMgr.getGuru(vm.getHypervisorType());
 
         boolean canRetry = true;
+        ExcludeList avoids = null;
         try {
             Journal journal = start.second().getJournal();
 
-            ExcludeList avoids = null;
+
             if (planToDeploy != null) {
                 avoids = planToDeploy.getAvoids();
             }
@@ -1026,6 +1027,10 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
                     }
                 }
             }
+
+            if (planToDeploy != null) {
+                planToDeploy.setAvoids(avoids);
+            }
         }
 
         if (startedVm == null) {