You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ch...@apache.org on 2013/03/07 15:48:42 UTC
git commit: refs/heads/4.1 - CLOUDSTACK-1315: Fix NPE when try to
upgrade network from VR to SRX-F5
Updated Branches:
refs/heads/4.1 a81850261 -> 7c7b05f4e
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/7c7b05f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/7c7b05f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/7c7b05f4
Branch: refs/heads/4.1
Commit: 7c7b05f4e02a1b895586b2aea40d8ff6a8b62b3b
Parents: a818502
Author: Sheng Yang <sh...@citrix.com>
Authored: Wed Mar 6 16:49:44 2013 -0800
Committer: Chip Childers <ch...@gmail.com>
Committed: Thu Mar 7 09:43:25 2013 -0500
----------------------------------------------------------------------
.../ExternalLoadBalancerDeviceManagerImpl.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7c7b05f4/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();