cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: updated refs/heads/4.3 to d2f1940
Date Thu, 19 Dec 2013 04:27:42 GMT
Updated Branches:
  refs/heads/4.3 15403a1f2 -> d2f194064


CLOUDSTACK-4941:
Adding the missing file
During HA and maintenance call different planners (if the original planners are not able to
find capacity) which skip some heurestics


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

Branch: refs/heads/4.3
Commit: d2f194064d619dd59582d8e2461ff3f96322e539
Parents: 15403a1
Author: Nitin Mehta <nitin.mehta@citrix.com>
Authored: Wed Dec 18 20:26:51 2013 -0800
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Wed Dec 18 20:26:51 2013 -0800

----------------------------------------------------------------------
 .../src/com/cloud/ha/HighAvailabilityManagerImpl.java  | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2f19406/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
index 54ca0aa..b2c1034 100755
--- a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
+++ b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
@@ -551,18 +551,15 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements
HighAvai
                 params.put(VirtualMachineProfile.Param.HaTag, _haTag);
             }
 
-            // First try starting the vm with its original planner, if it doesn't succeed
send HAPlanner as its an emergency.
-            _itMgr.advanceStart(vm.getUuid(), params, null);
-            VMInstanceVO started = _instanceDao.findById(vm.getId());
-            if (started != null && started.getState() == VirtualMachine.State.Running)
{
-                s_logger.info("VM is now restarted: " + vmId + " on " + started.getHostId());
-                return null;
-            }else {
+            try{
+                // First try starting the vm with its original planner, if it doesn't succeed
send HAPlanner as its an emergency.
+                _itMgr.advanceStart(vm.getUuid(), params, null);
+            }catch (InsufficientCapacityException e){
                 s_logger.warn("Failed to deploy vm " + vmId + " with original planner, sending
HAPlanner");
                 _itMgr.advanceStart(vm.getUuid(), params, _haPlanners.get(0));
             }
 
-            started = _instanceDao.findById(vm.getId());
+            VMInstanceVO started = _instanceDao.findById(vm.getId());
             if (started != null && started.getState() == VirtualMachine.State.Running)
{
                 s_logger.info("VM is now restarted: " + vmId + " on " + started.getHostId());
                 return null;


Mime
View raw message