cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [2/5] git commit: updated refs/heads/master to bb274a1
Date Thu, 23 Feb 2017 00:38:18 GMT
CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is
actually not used


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

Branch: refs/heads/master
Commit: 0f054246b65d003ae7f024b6ef125b2ec1846879
Parents: 6dced70
Author: Wei Zhou <w.zhou@tech.leaseweb.com>
Authored: Thu Feb 16 14:18:56 2017 +0100
Committer: Wei Zhou <w.zhou@tech.leaseweb.com>
Committed: Thu Feb 16 14:18:56 2017 +0100

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkServiceImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0f054246/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index b6dac87..e77b40e 100644
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -835,7 +835,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService
{
                 }
             }
             //check if the secondary ip associated with any static nat rule
-            IPAddressVO publicIpVO = _ipAddressDao.findByVmIp(secondaryIp);
+            IPAddressVO publicIpVO = _ipAddressDao.findByIpAndNetworkId(secIpVO.getNetworkId(),
secondaryIp);
             if (publicIpVO != null) {
                 s_logger.debug("VM nic IP " + secondaryIp + " is associated with the static
NAT rule public IP address id " + publicIpVO.getId());
                 throw new InvalidParameterValueException("Can' remove the ip " + secondaryIp
+ "is associate with static NAT rule public IP address id " + publicIpVO.getId());


Mime
View raw message