mirror of https://github.com/apache/cloudstack.git
bug 11513: add more log in the cleanup network
Reviewed-by:alena@citrix.com
This commit is contained in:
parent
a1cab92ae1
commit
211c7099a6
|
|
@ -1490,6 +1490,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
|
||||
@Override
|
||||
public void cleanupNics(VirtualMachineProfile<? extends VMInstanceVO> vm) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Cleaning network for vm: " + vm.getId());
|
||||
}
|
||||
|
||||
List<NicVO> nics = _nicDao.listByVmId(vm.getId());
|
||||
for (NicVO nic : nics) {
|
||||
nic.setState(Nic.State.Deallocating);
|
||||
|
|
|
|||
|
|
@ -212,6 +212,10 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
|
||||
@Override @DB
|
||||
public void deallocate(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("direct network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIp4Address());
|
||||
}
|
||||
|
||||
IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address());
|
||||
if (ip != null) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
|
|
|||
|
|
@ -185,6 +185,10 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
|
||||
@Override @DB
|
||||
public void deallocate(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIp4Address());
|
||||
}
|
||||
|
||||
IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address());
|
||||
if (ip != null && nic.getReservationStrategy() != ReservationStrategy.Managed) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue