cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [43/50] [abbrv] git commit: updated refs/heads/opendaylight to 858fb69
Date Fri, 03 Jan 2014 10:18:16 GMT
CLOUDSTACK-5552 fixed private gateway DB clean up on failure


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

Branch: refs/heads/opendaylight
Commit: 77878299fb95931a09d788a2198c61cfaf5399d9
Parents: 17b696e
Author: Jayapal <jayapal@apache.org>
Authored: Fri Jan 3 11:44:19 2014 +0530
Committer: Jayapal <jayapal@apache.org>
Committed: Fri Jan 3 12:57:12 2014 +0530

----------------------------------------------------------------------
 .../network/element/VpcVirtualRouterElement.java    | 16 ++++++++++++----
 .../cloud/network/vpc/NetworkACLManagerImpl.java    |  8 ++++++--
 2 files changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77878299/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/element/VpcVirtualRouterElement.java b/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
index f535e2e..5695a2c 100644
--- a/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
+++ b/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
@@ -353,6 +353,9 @@ public class VpcVirtualRouterElement extends VirtualRouterElement implements
Vpc
                 s_logger.debug("Failed to apply network acl id  " + gateway.getNetworkACLId()
+ "  on gateway ");
                 return false;
             }
+        } else {
+            s_logger.debug ("Failed to setup private gateway  "+ gateway);
+            return false;
         }
         return true;
     }
@@ -413,10 +416,15 @@ public class VpcVirtualRouterElement extends VirtualRouterElement implements
Vpc
                 return true;
             }
 
-            if (!_vpcRouterMgr.applyNetworkACLs(config, rules, routers, false)) {
-                throw new CloudRuntimeException("Failed to apply network acl rules in network
" + config.getId());
-            } else {
-                return true;
+            try {
+                if (!_vpcRouterMgr.applyNetworkACLs(config, rules, routers, false)) {
+                    return false;
+                } else {
+                    return true;
+                }
+            } catch (Exception ex) {
+                s_logger.debug("Failed to apply network acl in network " + config.getId());
+                return false;
             }
         } else {
             return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77878299/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
index a0decf3..979d407 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
@@ -377,8 +377,12 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
             throw new CloudRuntimeException("Failed to initialize vpc elements");
         }
 
-        for (VpcProvider provider : vpcElements) {
-            return provider.applyACLItemsToPrivateGw(gateway, rules);
+        try{
+            for (VpcProvider provider : vpcElements) {
+                return provider.applyACLItemsToPrivateGw(gateway, rules);
+            }
+        } catch(Exception ex) {
+            s_logger.debug("Failed to apply acl to private gateway " + gateway);
         }
         return false;
     }


Mime
View raw message