More logging to lock operations on the network

This commit is contained in:
Alena Prokharchyk 2012-08-17 16:25:04 -07:00
parent 0cf0523afe
commit d158b38007
2 changed files with 15 additions and 3 deletions

View File

@ -1921,6 +1921,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
ex.addProxyObject("networks", networkId, "networkId");
throw ex;
}
if (s_logger.isDebugEnabled()) {
s_logger.debug("Lock is acquired for network id " + networkId + " as a part of network implement");
}
try {
NetworkGuru guru = _networkGurus.get(network.getGuruName());
@ -1966,10 +1970,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
shutdownNetwork(networkId, context, false);
}
if (s_logger.isDebugEnabled()) {
s_logger.debug("Releasing lock for network id " + networkId);
}
_networksDao.releaseFromLockTable(networkId);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Lock is released for network id " + networkId + " as a part of network implement");
}
}
}

View File

@ -1386,6 +1386,10 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
if (network == null) {
throw new ConcurrentOperationException("Unable to lock network " + guestNetwork.getId());
}
if (s_logger.isDebugEnabled()) {
s_logger.debug("Lock is acquired for network id " + network.getId() + " as a part of router startup in " + dest);
}
try {
// Check if providers are supported in the physical networks
@ -1439,6 +1443,9 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
} finally {
if (network != null) {
_networkDao.releaseFromLockTable(network.getId());
if (s_logger.isDebugEnabled()) {
s_logger.debug("Lock is released for network id " + network.getId() + " as a part of router startup in " + dest);
}
}
}
return routers;