You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2017/02/23 00:38:18 UTC
[2/5] git commit: updated refs/heads/master to bb274a1
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....@tech.leaseweb.com>
Authored: Thu Feb 16 14:18:56 2017 +0100
Committer: Wei Zhou <w....@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());