mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Network destroy: when release ip addresses assigned to the network, no need to send applyIpAssociations command to the network elements as they are already shutdown.
This commit is contained in:
parent
cddfd75595
commit
620466d393
@ -1656,15 +1656,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
List<IPAddressVO> ipsToRelease = _ipAddressDao.listByAssociatedNetwork(networkId);
|
||||
if (ipsToRelease != null && !ipsToRelease.isEmpty()) {
|
||||
for (IPAddressVO ip : ipsToRelease) {
|
||||
if (!releasePublicIpAddress(ip.getAddress(), ip.getAccountId(), callerUserId)) {
|
||||
s_logger.warn("Failed to deallocate ip address as a part of network id=" + networkId + " destroy");
|
||||
success = false;
|
||||
}
|
||||
_ipAddressDao.unassignIpAddress(ip.getAddress());
|
||||
}
|
||||
|
||||
if (success) {
|
||||
s_logger.debug("Ip addresses are deallocated successfully as a part of network id=" + networkId + " destroy");
|
||||
}
|
||||
s_logger.debug("Ip addresses are unassigned successfully as a part of network id=" + networkId + " destroy");
|
||||
}
|
||||
|
||||
for (NetworkElement element : _networkElements) {
|
||||
|
||||
@ -58,9 +58,6 @@ import com.cloud.configuration.dao.ResourceLimitDao;
|
||||
import com.cloud.domain.Domain;
|
||||
import com.cloud.domain.DomainVO;
|
||||
import com.cloud.domain.dao.DomainDao;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.event.EventUtils;
|
||||
import com.cloud.event.EventVO;
|
||||
import com.cloud.exception.AgentUnavailableException;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user