Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D4DC11C71 for ; Tue, 24 Jun 2014 17:52:25 +0000 (UTC) Received: (qmail 90295 invoked by uid 500); 24 Jun 2014 17:52:25 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 90275 invoked by uid 500); 24 Jun 2014 17:52:24 -0000 Mailing-List: contact issues-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 issues@cloudstack.apache.org Received: (qmail 90265 invoked by uid 500); 24 Jun 2014 17:52:24 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 90262 invoked by uid 99); 24 Jun 2014 17:52:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2014 17:52:24 +0000 Date: Tue, 24 Jun 2014 17:52:24 +0000 (UTC) From: "Animesh Chaturvedi (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-6223) removeNicFromVirtualMachine fails if another instance in another domain has a nic with the same ip and a forwarding rule configured on it MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-6223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14042435#comment-14042435 ] Animesh Chaturvedi commented on CLOUDSTACK-6223: ------------------------------------------------ Daan did you pull this in for 4.4 > removeNicFromVirtualMachine fails if another instance in another domain has a nic with the same ip and a forwarding rule configured on it > ----------------------------------------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-6223 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6223 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Affects Versions: 4.2.1 > Reporter: Joris van Lieshout > Assignee: upendra moturi > Priority: Blocker > Fix For: 4.4.0 > > > When removeNicFromVirtualMachine is called for a nic on an instance the code below is evaluated. This piece of code searches for portforwarding rules across all domains. If another instance exists that has a nic with the same ip and a forwarding rule the search returns >1 and the removeNicFromVirtualMachine call failed. > server/src/com/cloud/network/rules/RulesManagerImpl.java > @Override > public List listAssociatedRulesForGuestNic(Nic nic){ > List result = new ArrayList(); > // add PF rules > result.addAll(_portForwardingDao.listByDestIpAddr(nic.getIp4Address())); > // add static NAT rules > Stack trace: > 2014-03-11 15:24:04,944 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-102:job-193607 = [ 30e81de3-2a00-49f2-8d80-545a765e4c1e ]) Unexpected exception while executing org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd > com.cloud.utils.exception.CloudRuntimeException: Failed to remove nic from VM[User|zzz1] in Ntwk[994|Guest|14], nic has associated Port forwarding or Load balancer or Static NAT rules. > at com.cloud.vm.VirtualMachineManagerImpl.removeNicFromVm(VirtualMachineManagerImpl.java:3058) > at com.cloud.vm.UserVmManagerImpl.removeNicFromVirtualMachine(UserVmManagerImpl.java:1031) > at org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd.execute(RemoveNicFromVMCmd.java:103) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158) > at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:679) -- This message was sent by Atlassian JIRA (v6.2#6252)