Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2936,7 +2936,8 @@ public boolean startNetwork(final long networkId, final DeployDestination dest,
@Override
public boolean restartNetwork(final Long networkId, final Account callerAccount, final User callerUser, final boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException,
InsufficientCapacityException {

boolean status = true;
boolean restartRequired = false;
final NetworkVO network = _networksDao.findById(networkId);

s_logger.debug("Restarting network " + networkId + "...");
Expand All @@ -2947,16 +2948,17 @@ public boolean restartNetwork(final Long networkId, final Account callerAccount,

if (cleanup) {
if (!rollingRestartRouters(network, offering, dest, context)) {
setRestartRequired(network, true);
return false;
status = false;
restartRequired = true;
}
return true;
setRestartRequired(network, restartRequired);
return status;
}

s_logger.debug("Implementing the network " + network + " elements and resources as a part of network restart without cleanup");
try {
implementNetworkElementsAndResources(dest, context, network, offering);
setRestartRequired(network, true);
setRestartRequired(network, false);
return true;
} catch (final Exception ex) {
s_logger.warn("Failed to implement network " + network + " elements and resources as a part of network restart due to ", ex);
Expand Down