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 285D5E2C5 for ; Fri, 8 Mar 2013 08:32:26 +0000 (UTC) Received: (qmail 30466 invoked by uid 500); 8 Mar 2013 08:32:26 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 30276 invoked by uid 500); 8 Mar 2013 08:32:25 -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 30245 invoked by uid 99); 8 Mar 2013 08:32:24 -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, 08 Mar 2013 08:32:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9A282831C1D; Fri, 8 Mar 2013 08:32:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: likithas@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: refs/heads/master - CLOUDSTACK-1509. During CreateVLANIPRange while trying to assign Public IPs to a new network if the network offering is persistent we get an NPE. Since associateIpRangeToAccount starts and commits a seaparte transaction, c Message-Id: <20130308083223.9A282831C1D@tyr.zones.apache.org> Date: Fri, 8 Mar 2013 08:32:23 +0000 (UTC) Updated Branches: refs/heads/master 37bab18c6 -> ee9f97f92 CLOUDSTACK-1509. During CreateVLANIPRange while trying to assign Public IPs to a new network if the network offering is persistent we get an NPE. Since associateIpRangeToAccount starts and commits a seaparte transaction, commit the transaction started for createVlanAndPublicIpRange before calling associateIpAddressListToAccount. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ee9f97f9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ee9f97f9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ee9f97f9 Branch: refs/heads/master Commit: ee9f97f92ef7d395f6a15f92225c9964e86a15e8 Parents: 37bab18 Author: Likitha Shetty Authored: Fri Mar 8 13:59:02 2013 +0530 Committer: Likitha Shetty Committed: Fri Mar 8 13:59:02 2013 +0530 ---------------------------------------------------------------------- .../configuration/ConfigurationManagerImpl.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ee9f97f9/server/src/com/cloud/configuration/ConfigurationManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 62f4fd5..7f449de 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -2330,10 +2330,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati Vlan vlan = createVlanAndPublicIpRange(zoneId, networkId, physicalNetworkId, forVirtualNetwork, podId, startIP, endIP, vlanGateway, vlanNetmask, vlanId, vlanOwner, startIPv6, endIPv6, ip6Gateway, ip6Cidr); + txn.commit(); if (associateIpRangeToAccount) { _networkMgr.associateIpAddressListToAccount(userId, vlanOwner.getId(), zoneId, vlan.getId(), null); } - txn.commit(); // Associate ips to the network if (associateIpRangeToAccount) {