mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Clean up global redundant_router config item
We would use network_offering option in 3.0 instead.
This commit is contained in:
parent
f40cfebd97
commit
1fb5030cca
@ -81,7 +81,6 @@ public enum Config {
|
||||
VmNetworkThrottlingRate("Network", ManagementServer.class, Integer.class, "vm.network.throttling.rate", "200", "Default data transfer rate in megabits per second allowed in User vm's default network.", null),
|
||||
|
||||
|
||||
RedundantRouter("Network", ManagementServer.class, Boolean.class, "network.redundantrouter", "false", "enable/disable redundant virtual router", null),
|
||||
SecurityGroupWorkCleanupInterval("Network", ManagementServer.class, Integer.class, "network.securitygroups.work.cleanup.interval", "120", "Time interval (seconds) in which finished work is cleaned up from the work table", null),
|
||||
SecurityGroupWorkerThreads("Network", ManagementServer.class, Integer.class, "network.securitygroups.workers.pool.size", "50", "Number of worker threads processing the security group update work queue", null),
|
||||
SecurityGroupWorkGlobalLockTimeout("Network", ManagementServer.class, Integer.class, "network.securitygroups.work.lock.timeout", "300", "Lock wait timeout (seconds) while updating the security group work queue", null),
|
||||
|
||||
@ -53,6 +53,7 @@ import com.cloud.network.rules.RulesManager;
|
||||
import com.cloud.network.rules.StaticNat;
|
||||
import com.cloud.network.vpn.RemoteAccessVpnElement;
|
||||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.offerings.NetworkOfferingVO;
|
||||
import com.cloud.offerings.dao.NetworkOfferingDao;
|
||||
import com.cloud.org.Cluster;
|
||||
import com.cloud.uservm.UserVm;
|
||||
@ -100,7 +101,6 @@ public class VirtualRouterElement extends DhcpElement implements NetworkElement,
|
||||
|
||||
@Override
|
||||
public boolean implement(Network guestConfig, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
|
||||
boolean isRedundant = _configDao.getValue("network.redundantrouter").equals("true");
|
||||
if (!canHandle(guestConfig.getGuestType(), dest.getDataCenter())) {
|
||||
return false;
|
||||
}
|
||||
@ -117,13 +117,14 @@ public class VirtualRouterElement extends DhcpElement implements NetworkElement,
|
||||
@Override
|
||||
public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
|
||||
if (canHandle(network.getGuestType(), dest.getDataCenter())) {
|
||||
boolean isRedundant = _configDao.getValue("network.redundantrouter").equals("true");
|
||||
if (vm.getType() != VirtualMachine.Type.User) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
VirtualMachineProfile<UserVm> uservm = (VirtualMachineProfile<UserVm>)vm;
|
||||
NetworkOfferingVO offering = _networkOfferingDao.findById(network.getNetworkOfferingId());
|
||||
boolean isRedundant = offering.getRedundantRouter();
|
||||
List<DomainRouterVO> routers = _routerMgr.deployVirtualRouter(network, dest, _accountMgr.getAccount(network.getAccountId()), uservm.getParameters(), isRedundant);
|
||||
if ((routers == null) || (routers.size() == 0)) {
|
||||
throw new ResourceUnavailableException("Can't find at least one running router!", this.getClass(), 0);
|
||||
|
||||
@ -1382,7 +1382,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
buf.append(" template=domP type=" + type+rpFilter);
|
||||
buf.append(" name=").append(profile.getHostName());
|
||||
|
||||
boolean isRedundant = _configDao.getValue("network.redundantrouter").equals("true");
|
||||
boolean isRedundant = router.getIsRedundantRouter();
|
||||
if (isRedundant) {
|
||||
buf.append(" redundant_router=1");
|
||||
List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(network.getId(), Role.DHCP_FIREWALL_LB_PASSWD_USERDATA);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user