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.4 to d27c797
Date Thu, 17 Apr 2014 01:10:10 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 5d0f507ea -> d27c797ab


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

Conflicts:
	server/src/com/cloud/network/element/VirtualRouterElement.java


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

Branch: refs/heads/4.4
Commit: d27c797abc5386087b8878627505abb9cdfc2e9a
Parents: 5d0f507
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 18:00:35 2014 -0700

----------------------------------------------------------------------
 .../cloud/network/element/VirtualRouterElement.java   | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d27c797a/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 3f4ba5b..3b3cacd 100755
--- a/server/src/com/cloud/network/element/VirtualRouterElement.java
+++ b/server/src/com/cloud/network/element/VirtualRouterElement.java
@@ -188,10 +188,16 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
         Map<VirtualMachineProfile.Param, Object> params = new HashMap<VirtualMachineProfile.Param,
Object>(1);
         params.put(VirtualMachineProfile.Param.ReProgramGuestNetworks, true);
 
-        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!",
DataCenter.class, network.getDataCenterId());
+        List<DomainRouterVO> routers = _routerMgr.deployVirtualRouterInGuestNetwork(network,
dest,
+                _accountMgr.getAccount(network.getAccountId()), params,
+                offering.getRedundantRouter());
+        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());
         }
 
         return true;


Mime
View raw message