mirror of https://github.com/apache/cloudstack.git
server: VPC redundant vrs run on same hypervisor (#3421)
For VPC supports redundant VRs, when start the second VR, the pod/cluster/host of first VR should be added to avoid list. This provides higher availability. The network VRs have the same process already.
This commit is contained in:
parent
2408783355
commit
9ac32aae38
|
|
@ -375,8 +375,13 @@ public class NetworkHelperImpl implements NetworkHelper {
|
|||
final List<Long> networkIds = _routerDao.getRouterNetworks(router.getId());
|
||||
|
||||
DomainRouterVO routerToBeAvoid = null;
|
||||
List<DomainRouterVO> routerList = null;
|
||||
if (networkIds.size() != 0) {
|
||||
final List<DomainRouterVO> routerList = _routerDao.findByNetwork(networkIds.get(0));
|
||||
routerList = _routerDao.findByNetwork(networkIds.get(0));
|
||||
} else if (router.getVpcId() != null) {
|
||||
routerList = _routerDao.listByVpcId(router.getVpcId());
|
||||
}
|
||||
if (routerList != null) {
|
||||
for (final DomainRouterVO rrouter : routerList) {
|
||||
if (rrouter.getHostId() != null && rrouter.getIsRedundantRouter() && rrouter.getState() == State.Running) {
|
||||
if (routerToBeAvoid != null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue