Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3173F10847 for ; Tue, 11 Jun 2013 06:42:53 +0000 (UTC) Received: (qmail 17649 invoked by uid 500); 11 Jun 2013 06:42:53 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 17546 invoked by uid 500); 11 Jun 2013 06:42:52 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 17539 invoked by uid 99); 11 Jun 2013 06:42:51 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jun 2013 06:42:51 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4B0148A3529; Tue, 11 Jun 2013 06:42:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: likithas@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 7b63894 Date: Tue, 11 Jun 2013 06:42:50 +0000 (UTC) Updated Branches: refs/heads/master bbfa9bfcb -> 7b63894a0 CLOUDSTACK-2891. While adding a new vlan range if the new range extends an existing range then CS extends the existing range to include the new range. This is done by checking if the last vlan in the new range is same as the start vlan of any existing range. Since for a single vlan the start and the end vlan are the same the check goes to an infinite loop resulting in a java.lang.OutOfMemoryError: Java heap space error. Remove the check for a single vlan because if an existing range starts with the single vlan then it implies that the range already exists Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7b63894a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7b63894a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7b63894a Branch: refs/heads/master Commit: 7b63894a0a2226c16de6ce2eaa5aa6f62746026c Parents: bbfa9bf Author: Likitha Shetty Authored: Tue Jun 11 11:45:31 2013 +0530 Committer: Likitha Shetty Committed: Tue Jun 11 12:08:05 2013 +0530 ---------------------------------------------------------------------- server/src/com/cloud/network/NetworkServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7b63894a/server/src/com/cloud/network/NetworkServiceImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java index d5a59d6..407bdc2 100755 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -2663,7 +2663,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { existingRanges.get(i).second(-1); } value = vnetMap.get((existingRanges.get(i).second())); - if (value != null) { + if (value != null && ( (existingRanges.get(i).second()) != (existingRanges.get(i).first()) )) { vnetMap.remove((existingRanges.get(i).second())); vnetMap.remove(existingRanges.get(i).first()); vnetMap.put(existingRanges.get(i).first(),value);