cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: updated refs/heads/4.3 to a289330
Date Thu, 17 Apr 2014 00:58:47 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 90106f6d8 -> a28933085


CLOUDSTACK-6433: Don't return success if only one of RvR successfully created


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a2893308
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a2893308
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a2893308

Branch: refs/heads/4.3
Commit: a28933085cb1f637a34fe05b9c59965a212bf591
Parents: 90106f6
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Wed Apr 16 17:57:59 2014 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Wed Apr 16 17:57:59 2014 -0700

----------------------------------------------------------------------
 .../src/com/cloud/network/element/VirtualRouterElement.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a2893308/server/src/com/cloud/network/element/VirtualRouterElement.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/element/VirtualRouterElement.java b/server/src/com/cloud/network/element/VirtualRouterElement.java
index 73966f3..5964275 100755
--- a/server/src/com/cloud/network/element/VirtualRouterElement.java
+++ b/server/src/com/cloud/network/element/VirtualRouterElement.java
@@ -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());
         }
         


Mime
View raw message