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/master to 59a9db3
Date Thu, 17 Apr 2014 01:11:40 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 085911f0a -> 59a9db39b


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/59a9db39
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/59a9db39
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/59a9db39

Branch: refs/heads/master
Commit: 59a9db39b1d17056753385c0e091bfe26d2df522
Parents: 085911f
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:10:39 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/59a9db39/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