Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8ADCA200C32 for ; Thu, 23 Feb 2017 01:38:19 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 898C8160B7D; Thu, 23 Feb 2017 00:38:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D5F8D160B62 for ; Thu, 23 Feb 2017 01:38:18 +0100 (CET) Received: (qmail 82781 invoked by uid 500); 23 Feb 2017 00:38:18 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 82769 invoked by uid 99); 23 Feb 2017 00:38:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2017 00:38:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D7C02DFF0B; Thu, 23 Feb 2017 00:38:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rajani@apache.org To: commits@cloudstack.apache.org Date: Thu, 23 Feb 2017 00:38:18 -0000 Message-Id: <2afcbb819430424ba4d9125a70f31efd@git.apache.org> In-Reply-To: <6fec9a04167641338518e35aff5f2258@git.apache.org> References: <6fec9a04167641338518e35aff5f2258@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/5] git commit: updated refs/heads/master to bb274a1 archived-at: Thu, 23 Feb 2017 00:38:19 -0000 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 Authored: Thu Feb 16 14:18:56 2017 +0100 Committer: Wei Zhou 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());