mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Clean up restart Network
This commit is contained in:
parent
bcf5058eda
commit
18f2df44a1
@ -2408,13 +2408,23 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
s_logger.debug("Restarting network elements for the network " + network);
|
||||
for (NetworkElement element : _networkElements) {
|
||||
// stop and start the network element
|
||||
if (!element.restart(network, context)) {
|
||||
s_logger.warn("Failed to restart network element(s) as a part of network id" + networkId + " restart");
|
||||
try {
|
||||
boolean supported = element.restart(network, context);
|
||||
if (!supported) {
|
||||
s_logger.trace("Network element(s) " + element.getName() + " doesn't support network id" + networkId + " restart");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.warn("Failed to restart network element" + element.getName() + " as a part of network id" + networkId + " restart", ex);
|
||||
success = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// associate all ip addresses
|
||||
if (!applyIpAssociations(network, false)) {
|
||||
s_logger.warn("Failed to apply ip addresses as a part of network id" + networkId + " restart");
|
||||
|
||||
@ -152,7 +152,7 @@ public class VirtualRouterElement extends DhcpElement implements NetworkElement,
|
||||
long host_id = 0;
|
||||
for (DomainRouterVO router : routers) {
|
||||
host_id = router.getHostId();
|
||||
/* TODO it's not completely safe to ignore these failure, but we would try to push on now */
|
||||
/* FIXME it's not completely safe to ignore these failure, but we would try to push on now */
|
||||
if (_routerMgr.stopRouter(router.getId(), false) == null) {
|
||||
s_logger.warn("Failed to stop virtual router element " + router + " as a part of network " + network + " restart");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user