Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BB9BD1BB for ; Fri, 2 Nov 2012 17:34:50 +0000 (UTC) Received: (qmail 69849 invoked by uid 500); 2 Nov 2012 17:34:50 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 69804 invoked by uid 500); 2 Nov 2012 17:34:50 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 69519 invoked by uid 99); 2 Nov 2012 17:34:49 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Nov 2012 17:34:49 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9D53B5219F; Fri, 2 Nov 2012 17:34:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: alena1108@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/6] git commit: CS-16213: skip agent rebalancing when the management server doesn't own the host any more Message-Id: <20121102173449.9D53B5219F@tyr.zones.apache.org> Date: Fri, 2 Nov 2012 17:34:49 +0000 (UTC) CS-16213: skip agent rebalancing when the management server doesn't own the host any more Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/3948d7d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/3948d7d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/3948d7d7 Branch: refs/heads/master Commit: 3948d7d7c55581eadb4917cd317234c294f61ff3 Parents: 62607c9 Author: Alena Prokharchyk Authored: Tue Oct 23 10:47:44 2012 -0700 Committer: Alena Prokharchyk Committed: Fri Nov 2 09:59:37 2012 -0700 ---------------------------------------------------------------------- .../agent/manager/ClusteredAgentManagerImpl.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3948d7d7/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 78143fd..93c3912 100755 --- a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java +++ b/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java @@ -863,7 +863,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust continue; } - if (transferMap.getInitialOwner() != _nodeId || attache.forForward()) { + if (transferMap.getInitialOwner() != _nodeId || attache == null || attache.forForward()) { s_logger.debug("Management server " + _nodeId + " doesn't own host id=" + hostId + " any more, skipping rebalance for the host"); iterator.remove(); _hostTransferDao.completeAgentTransfer(hostId);