cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From likit...@apache.org
Subject git commit: updated refs/heads/master to 4f96905
Date Mon, 07 Jul 2014 08:18:59 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master a413536f9 -> 4f969057b


CLOUDSTACK-7030. After the restart of MS in a clustered MS pool, not all hung worker VMs are
recycled.
Recycle worker VMs that originally belonged to other management servers too because in case
of MS restart, the owner MS might change.


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

Branch: refs/heads/master
Commit: 4f969057b2434cf09562c05a503592f661e7d83e
Parents: a413536
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Mon Jul 7 12:01:38 2014 +0530
Committer: Likitha Shetty <likitha.shetty@citrix.com>
Committed: Mon Jul 7 13:38:47 2014 +0530

----------------------------------------------------------------------
 framework/cluster/src/com/cloud/cluster/ClusterManager.java | 2 ++
 .../cluster/src/com/cloud/cluster/ClusterManagerImpl.java   | 9 +++++++++
 .../cloud/hypervisor/vmware/manager/VmwareManagerImpl.java  | 2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f969057/framework/cluster/src/com/cloud/cluster/ClusterManager.java
----------------------------------------------------------------------
diff --git a/framework/cluster/src/com/cloud/cluster/ClusterManager.java b/framework/cluster/src/com/cloud/cluster/ClusterManager.java
index ffdf366..86d6fb3 100644
--- a/framework/cluster/src/com/cloud/cluster/ClusterManager.java
+++ b/framework/cluster/src/com/cloud/cluster/ClusterManager.java
@@ -60,6 +60,8 @@ public interface ClusterManager extends Manager {
 
     long getCurrentRunId();
 
+    public long getManagementRunId(long msId);
+
     public interface Dispatcher {
         String getName();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f969057/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
----------------------------------------------------------------------
diff --git a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
index 622aa62..4a0987f 100644
--- a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
+++ b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
@@ -1072,6 +1072,15 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager,
C
         return _runId;
     }
 
+    @Override
+    public long getManagementRunId(long msId) {
+        ManagementServerHostVO mshost = _mshostDao.findByMsid(msId);
+        if (mshost != null) {
+            return mshost.getRunid();
+        }
+        return -1;
+    }
+
     public boolean isManagementNodeAlive(long msid) {
         ManagementServerHostVO mshost = _mshostDao.findByMsid(msid);
         if (mshost != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f969057/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index 36d2322..3fd1a9c 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -531,7 +531,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager,
Vmw
             return true;
         }
 
-        if (msid == _clusterMgr.getManagementNodeId() && runid != _clusterMgr.getCurrentRunId())
{
+        if (runid != _clusterMgr.getManagementRunId(msid)) {
             if (s_logger.isInfoEnabled())
                 s_logger.info("Worker VM's owner management server has changed runid, recycle
it");
             return true;


Mime
View raw message