cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: refs/heads/master - CLOUDSTACK-1315: Fix NPE when try to upgrade network from VR to SRX-F5
Date Thu, 07 Mar 2013 00:51:35 GMT
Updated Branches:
  refs/heads/master e31cd2b3d -> 27ba0208f


CLOUDSTACK-1315: Fix NPE when try to upgrade network from VR to SRX-F5

Still return a valid object when reverting non-existed rules.


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

Branch: refs/heads/master
Commit: 27ba0208f068e60f588d25a5d0ad9c4d6503ad14
Parents: e31cd2b
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Wed Mar 6 16:49:44 2013 -0800
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Wed Mar 6 16:49:44 2013 -0800

----------------------------------------------------------------------
 .../ExternalLoadBalancerDeviceManagerImpl.java     |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/27ba0208/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
index 8856881..d7b6d78 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
@@ -819,7 +819,8 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
                 }
             } else {
                 s_logger.debug("Revoking a rule for an inline load balancer that has not
been programmed yet.");
-                return null;
+                nic.setNic(null);
+                return nic;
             }
         }
         
@@ -877,9 +878,9 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
                 MappingNic nic = getLoadBalancingIpNic(zone, network, rule.getSourceIpAddressId(),
revoked, null);
                 mappingStates.add(nic.getState());
                 NicVO loadBalancingIpNic = nic.getNic();
-                        if (loadBalancingIpNic == null) {
-                        continue;
-                    }
+                if (loadBalancingIpNic == null) {
+                	continue;
+                }
 
                 // Change the source IP address for the load balancing rule to be the load
balancing IP address
                 srcIp = loadBalancingIpNic.getIp4Address();


Mime
View raw message