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 <[email protected]> Authored: Tue Jul 10 14:32:52 2012 -0700 Committer: Alena Prokharchyk <[email protected]> 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<IPAddressVO> 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()); } }
