You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2012/11/02 18:53:40 UTC
[1/6] git commit: CS-16310: don't process Disconnect when:
Updated Branches:
refs/heads/master 3948d7d7c -> 1f458983a
CS-16310: don't process Disconnect when:
* attache is not forForward()
* and the Disconnect came through cluster notification event
The fix will prevent delayed AgentDisconnect cluster notification processing.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/1f458983
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/1f458983
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/1f458983
Branch: refs/heads/master
Commit: 1f458983afb9a19752e84f148a05f3a1c161ae91
Parents: 013102c
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Thu Nov 1 15:22:15 2012 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Fri Nov 2 10:51:39 2012 -0700
----------------------------------------------------------------------
.../agent/manager/ClusteredAgentManagerImpl.java | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1f458983/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
index ace25a4..1b6dc44 100755
--- a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
+++ b/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
@@ -305,16 +305,26 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
}
AgentAttache attache = findAttache(hostId);
if (attache != null) {
+ //don't process disconnect if the host is being rebalanced
if (_clusterMgr.isAgentRebalanceEnabled()) {
- //don't process disconnect if the host is being rebalanced
HostTransferMapVO transferVO = _hostTransferDao.findById(hostId);
if (transferVO != null) {
if (transferVO.getFutureOwner() == _nodeId && transferVO.getState() == HostTransferState.TransferStarted) {
- s_logger.debug("Not processing disconnect event as the host is being connected to " + _nodeId);
+ s_logger.debug("Not processing " + Event.AgentDisconnected + " event for the host id="
+ + hostId +" as the host is being connected to " + _nodeId);
return true;
}
}
}
+
+ //don't process disconnect if the disconnect came for the host via delayed cluster notification,
+ //but the host has already reconnected to the current management server
+ if (!attache.forForward()) {
+ s_logger.debug("Not processing " + Event.AgentDisconnected + " event for the host id="
+ + hostId +" as the host is directly connected to the current management server " + _nodeId);
+ return true;
+ }
+
return super.handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected, false);
}