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 40C0ED05D for ; Tue, 10 Jul 2012 21:34:59 +0000 (UTC) Received: (qmail 53052 invoked by uid 500); 10 Jul 2012 21:34:59 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 53039 invoked by uid 500); 10 Jul 2012 21:34:59 -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 53031 invoked by uid 99); 10 Jul 2012 21:34:59 -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, 10 Jul 2012 21:34:59 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A7646D77B; Tue, 10 Jul 2012 21:34:58 +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: git commit: VPC: CS-15345 - fixed regression in ipRelease happening as a part of cleanupNetworkResources method Message-Id: <20120710213458.A7646D77B@tyr.zones.apache.org> Date: Tue, 10 Jul 2012 21:34:58 +0000 (UTC) Updated Branches: refs/heads/vpc 94c62f212 -> c2f9417de VPC: CS-15345 - fixed regression in ipRelease happening as a part of cleanupNetworkResources method Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/c2f9417d Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/c2f9417d Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/c2f9417d Branch: refs/heads/vpc Commit: c2f9417de4eba277db8fb0dc62a53a5b6a08aa7b Parents: 94c62f2 Author: Alena Prokharchyk Authored: Tue Jul 10 14:32:52 2012 -0700 Committer: Alena Prokharchyk Committed: Tue Jul 10 14:35:50 2012 -0700 ---------------------------------------------------------------------- api/src/com/cloud/network/rules/FirewallRule.java | 1 - .../src/com/cloud/network/NetworkManagerImpl.java | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c2f9417d/api/src/com/cloud/network/rules/FirewallRule.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/network/rules/FirewallRule.java b/api/src/com/cloud/network/rules/FirewallRule.java index 5c57dff..f2a83af 100644 --- a/api/src/com/cloud/network/rules/FirewallRule.java +++ b/api/src/com/cloud/network/rules/FirewallRule.java @@ -19,7 +19,6 @@ package com.cloud.network.rules; import java.util.List; import com.cloud.acl.ControlledEntity; -import com.cloud.network.rules.FirewallRule.TrafficType; public interface FirewallRule extends ControlledEntity { enum Purpose { http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c2f9417d/server/src/com/cloud/network/NetworkManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index 86258fa..961fabc 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -6055,9 +6055,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag //release all ip addresses List ipsToRelease = _ipAddressDao.listByAssociatedNetwork(networkId, null); for (IPAddressVO ipToRelease : ipsToRelease) { - if (ipToRelease.getVpcId() != null) { + if (ipToRelease.getVpcId() == null) { IPAddressVO ip = markIpAsUnavailable(ipToRelease.getId()); assert (ip != null) : "Unable to mark the ip address id=" + ipToRelease.getId() + " as unavailable."; + } else { + unassignIPFromVpcNetwork(ipToRelease.getId()); } }