cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/internallb to ed50caa
Date Tue, 30 Apr 2013 00:49:15 GMT
Updated Branches:
  refs/heads/internallb 4c22c911a -> ed50caa01


InternalLbVM: handle the scenario when sourceIpAddress is not passed when create internal
Lb rule


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

Branch: refs/heads/internallb
Commit: ed50caa01c12320c4fa5ff7d4e0818840a6c764d
Parents: 4c22c91
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Mon Apr 29 17:48:36 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Mon Apr 29 17:48:36 2013 -0700

----------------------------------------------------------------------
 .../lb/ApplicationLoadBalancerManagerImpl.java     |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed50caa0/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
b/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
index b646bad..296dea9 100644
--- a/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
+++ b/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
@@ -236,14 +236,14 @@ public class ApplicationLoadBalancerManagerImpl extends ManagerBase
implements A
      * @return
      * @throws InsufficientVirtualNetworkCapcityException
      */
-    protected Ip getSourceIp(Scheme scheme, Network sourceIpNtwk, String requestedIp) throws
InsufficientVirtualNetworkCapcityException {
-        //Get source IP address
-        if (_lbDao.countBySourceIp(new Ip(requestedIp), sourceIpNtwk.getId()) > 0)  {
-            s_logger.debug("IP address " + requestedIp + " is already used by existing LB
rule, returning it");
-            return new Ip(requestedIp);
-        }
+    protected Ip getSourceIp(Scheme scheme, Network sourceIpNtwk, String requestedIp) throws
InsufficientVirtualNetworkCapcityException {       
         
         if (requestedIp != null) {
+            if (_lbDao.countBySourceIp(new Ip(requestedIp), sourceIpNtwk.getId()) > 0)
 {
+                s_logger.debug("IP address " + requestedIp + " is already used by existing
LB rule, returning it");
+                return new Ip(requestedIp);
+            }
+            
             validateRequestedSourceIpForLbRule(sourceIpNtwk, new Ip(requestedIp), scheme);
         }
         


Mime
View raw message