ustcweizhou commented on a change in pull request #3421: RvR: VPC redundant vrs
run on same hypervisor
URL: https://github.com/apache/cloudstack/pull/3421#discussion_r297126890
##########
File path: server/src/com/cloud/network/router/NetworkHelperImpl.java
##########
@@ -388,6 +388,19 @@ public DomainRouterVO startVirtualRouter(final
DomainRouterVO router, final User
routerToBeAvoid = rrouter;
}
}
+ } else if (router.getVpcId() != null) {
+ final List<DomainRouterVO> routerList =
_routerDao.listByVpcId(router.getVpcId());
+ for (final DomainRouterVO rrouter : routerList) {
+ if (rrouter.getHostId() != null &&
rrouter.getIsRedundantRouter() && rrouter.getState() == State.Running) {
+ if (routerToBeAvoid != null) {
Review comment:
it should be checked at some other places I think.
I am too lazy I just copied the lines from 380 to 390
https://github.com/apache/cloudstack/blob/4.11/server/src/com/cloud/network/router/NetworkHelperImpl.java#L380,L390
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services