mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'origin/4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
commit
233f46c94b
@ -93,6 +93,9 @@ public interface NetworkOrchestrationService {
|
|||||||
ConfigKey<Boolean> ForgedTransmits = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.forged.transmits", "true",
|
ConfigKey<Boolean> ForgedTransmits = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.forged.transmits", "true",
|
||||||
"Whether to allow or deny forged transmits on nics for applicable network elements such as for vswitch/dvswitch portgroups.", true);
|
"Whether to allow or deny forged transmits on nics for applicable network elements such as for vswitch/dvswitch portgroups.", true);
|
||||||
|
|
||||||
|
ConfigKey<Boolean> RollingRestartEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.rolling.restart", "true",
|
||||||
|
"Whether to allow or deny rolling restart of network routers.", true);
|
||||||
|
|
||||||
List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name, String displayText, boolean isDefault)
|
List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name, String displayText, boolean isDefault)
|
||||||
throws ConcurrentOperationException;
|
throws ConcurrentOperationException;
|
||||||
|
|
||||||
|
|||||||
@ -2927,6 +2927,14 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
* @throws InsufficientCapacityException
|
* @throws InsufficientCapacityException
|
||||||
*/
|
*/
|
||||||
private boolean rollingRestartRouters(final NetworkVO network, final NetworkOffering offering, final DeployDestination dest, final ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
|
private boolean rollingRestartRouters(final NetworkVO network, final NetworkOffering offering, final DeployDestination dest, final ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
|
||||||
|
if (!NetworkOrchestrationService.RollingRestartEnabled.value()) {
|
||||||
|
if (shutdownNetworkElementsAndResources(context, true, network)) {
|
||||||
|
implementNetworkElementsAndResources(dest, context, network, offering);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
s_logger.debug("Failed to shutdown the network elements and resources as a part of network restart: " + network.getState());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
s_logger.debug("Performing rolling restart of routers of network " + network);
|
s_logger.debug("Performing rolling restart of routers of network " + network);
|
||||||
destroyExpendableRouters(_routerDao.findByNetwork(network.getId()), context);
|
destroyExpendableRouters(_routerDao.findByNetwork(network.getId()), context);
|
||||||
|
|
||||||
@ -3831,6 +3839,6 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
public ConfigKey<?>[] getConfigKeys() {
|
public ConfigKey<?>[] getConfigKeys() {
|
||||||
return new ConfigKey<?>[] {NetworkGcWait, NetworkGcInterval, NetworkLockTimeout,
|
return new ConfigKey<?>[] {NetworkGcWait, NetworkGcInterval, NetworkLockTimeout,
|
||||||
GuestDomainSuffix, NetworkThrottlingRate, MinVRVersion,
|
GuestDomainSuffix, NetworkThrottlingRate, MinVRVersion,
|
||||||
PromiscuousMode, MacAddressChanges, ForgedTransmits};
|
PromiscuousMode, MacAddressChanges, ForgedTransmits, RollingRestartEnabled};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2458,6 +2458,13 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
|
|||||||
* @throws InsufficientCapacityException
|
* @throws InsufficientCapacityException
|
||||||
*/
|
*/
|
||||||
private boolean rollingRestartVpc(final Vpc vpc, final ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
|
private boolean rollingRestartVpc(final Vpc vpc, final ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
|
||||||
|
if (!NetworkOrchestrationService.RollingRestartEnabled.value()) {
|
||||||
|
if (shutdownVpc(vpc.getId())) {
|
||||||
|
return startVpc(vpc.getId(), false);
|
||||||
|
}
|
||||||
|
s_logger.warn("Failed to shutdown vpc as a part of VPC " + vpc + " restart process");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
s_logger.debug("Performing rolling restart of routers of VPC " + vpc);
|
s_logger.debug("Performing rolling restart of routers of VPC " + vpc);
|
||||||
_ntwkMgr.destroyExpendableRouters(_routerDao.listByVpcId(vpc.getId()), context);
|
_ntwkMgr.destroyExpendableRouters(_routerDao.listByVpcId(vpc.getId()), context);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user