mirror of https://github.com/apache/cloudstack.git
bug 10991: Determine existing redundant router using both state and host id
Seems in some condition, when a router is stopped, it's host_id != null. status 10991: resolved fixed
This commit is contained in:
parent
355be3a417
commit
7638f8e7a7
|
|
@ -945,7 +945,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
List<DomainRouterVO> routerList = _routerDao.findBy(router.getAccountId(), router.getDataCenterIdToDeployIn());
|
||||
DomainRouterVO routerToBeAvoid = null;
|
||||
for (DomainRouterVO rrouter : routerList) {
|
||||
if (rrouter.getHostId() != null && rrouter.getIsRedundantRouter()) {
|
||||
if (rrouter.getHostId() != null && rrouter.getIsRedundantRouter() && rrouter.getState() == State.Running) {
|
||||
if (routerToBeAvoid != null) {
|
||||
throw new ResourceUnavailableException("There are already two redundant routers with IP " + router.getPublicIpAddress(), this.getClass(), 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue