cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [1/2] git commit: updated refs/heads/internallb to 08521e4
Date Wed, 10 Apr 2013 22:35:18 GMT
Updated Branches:
  refs/heads/internallb d8ea8540d -> 08521e416


Internal LB: applyLoadBalancerRules - put not null check for sourceIpAddressId (can be null
when Schema is not Public)


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

Branch: refs/heads/internallb
Commit: 08521e4164944ca1f3e42543514808e21525efa2
Parents: 528796d
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Wed Apr 10 15:28:12 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Apr 10 15:34:55 2013 -0700

----------------------------------------------------------------------
 .../network/lb/LoadBalancingRulesManagerImpl.java  |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/08521e41/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index ba31e6f..0a9c5b6 100755
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -1621,8 +1621,10 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase
implements
                 }
                 // if the rule is the last one for the ip address assigned to
                 // VPC, unassign it from the network
-                IpAddress ip = _ipAddressDao.findById(lb.getSourceIpAddressId());
-                _vpcMgr.unassignIPFromVpcNetwork(ip.getId(), lb.getNetworkId());
+                if (lb.getSourceIpAddressId() != null) {
+                    IpAddress ip = _ipAddressDao.findById(lb.getSourceIpAddressId());
+                    _vpcMgr.unassignIPFromVpcNetwork(ip.getId(), lb.getNetworkId());
+                }
             }
         }
 


Mime
View raw message