mirror of https://github.com/apache/cloudstack.git
VPC: CS-15345 - fixed regression in ipRelease happening as a part of cleanupNetworkResources method
This commit is contained in:
parent
e4a00f1faf
commit
3caffc7855
|
|
@ -15,7 +15,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 {
|
||||
|
|
|
|||
|
|
@ -6040,9 +6040,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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue