mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6433: Don't return success if only one of RvR successfully created
This commit is contained in:
parent
90106f6d8e
commit
a28933085c
|
|
@ -188,8 +188,12 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
|
|||
List<DomainRouterVO> routers = _routerMgr.deployVirtualRouterInGuestNetwork(network, dest,
|
||||
_accountMgr.getAccount(network.getAccountId()), params,
|
||||
offering.getRedundantRouter());
|
||||
if ((routers == null) || (routers.size() == 0)) {
|
||||
throw new ResourceUnavailableException("Can't find at least one running router!",
|
||||
int routerCounts = 1;
|
||||
if (offering.getRedundantRouter()) {
|
||||
routerCounts = 2;
|
||||
}
|
||||
if ((routers == null) || (routers.size() < routerCounts)) {
|
||||
throw new ResourceUnavailableException("Can't find all necessary running routers!",
|
||||
DataCenter.class, network.getDataCenterId());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue