You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/11/30 07:46:51 UTC

[1/2] git commit: updated refs/heads/master to 20dcc25

Repository: cloudstack
Updated Branches:
  refs/heads/master 7e64c1206 -> 20dcc2588


CLOUDSTACK-8866 : restart.retry.interval is being used instead of migrate.retry.interval during host maintenance


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

Branch: refs/heads/master
Commit: 07ee5e9bf0e167299faef81f41a8514200696b65
Parents: 8442bd8
Author: Maneesha.P <ma...@citrix.com>
Authored: Tue Sep 8 10:45:14 2015 +0530
Committer: Maneesha.P <ma...@citrix.com>
Committed: Wed Sep 16 12:52:34 2015 +0530

----------------------------------------------------------------------
 .../cloud/ha/HighAvailabilityManagerImpl.java   | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/07ee5e9b/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 cce4457..9458cdc 100644
--- a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
+++ b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
@@ -763,9 +763,25 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai
         work.setDateTaken(null);
     }
 
+    private long getRescheduleTime(WorkType workType) {
+        switch (workType) {
+            case Migration:
+                return ((System.currentTimeMillis() >> 10) + _migrateRetryInterval);
+            case HA:
+                return ((System.currentTimeMillis() >> 10) + _restartRetryInterval);
+            case Stop:
+            case CheckStop:
+            case ForceStop:
+                return ((System.currentTimeMillis() >> 10) + _stopRetryInterval);
+            case Destroy:
+                return ((System.currentTimeMillis() >> 10) + _restartRetryInterval);
+        }
+        return 0;
+    }
+
     private void processWork(final HaWorkVO work) {
+        final WorkType wt = work.getWorkType();
         try {
-            final WorkType wt = work.getWorkType();
             Long nextTime = null;
             if (wt == WorkType.Migration) {
                 nextTime = migrate(work);
@@ -789,7 +805,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai
         } catch (Exception e) {
             s_logger.warn("Encountered unhandled exception during HA process, reschedule work", e);
 
-            long nextTime = (System.currentTimeMillis() >> 10) + _restartRetryInterval;
+            long nextTime = getRescheduleTime(wt);
             rescheduleWork(work, nextTime);
 
             // if restart failed in the middle due to exception, VM state may has been changed


[2/2] git commit: updated refs/heads/master to 20dcc25

Posted by da...@apache.org.
Merge pull request #834 from maneesha-p/CLOUDSTACK-8866

CLOUDSTACK-8866 : restart.retry.interval is being used instead of migrate.retry.interval during host maintenanceThe frequency at which Cloudstack tries to migrate the VMs is currently controlled by the global parameter "restart.retry.interval" which has a default value of 600 seconds or 10 minutes.This has to be changed to use "migrate.retry.interval" which by default is 120 seconds or 2 minutes . Cloudstack uses restart.retry.interval for all operations-migrate,restart,stop,destroy.

* pr/834:
  CLOUDSTACK-8866 : restart.retry.interval is being used instead of migrate.retry.interval during host maintenance

Signed-off-by: Daan Hoogland <da...@onecht.net>


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

Branch: refs/heads/master
Commit: 20dcc25884316b1b1a0c8ff146a84cf02743d88b
Parents: 7e64c12 07ee5e9
Author: Daan Hoogland <da...@onecht.net>
Authored: Mon Nov 30 07:45:55 2015 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Mon Nov 30 07:45:55 2015 +0100

----------------------------------------------------------------------
 .../cloud/ha/HighAvailabilityManagerImpl.java   | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20dcc258/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
----------------------------------------------------------------------