[ https://issues.apache.org/jira/browse/CLOUDSTACK-6223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14131341#comment-14131341 ]
ASF subversion and git services commented on CLOUDSTACK-6223: ------------------------------------------------------------- Commit 213bdbde35e273b2c40d421071e46f2af6de729c in cloudstack's branch refs/heads/4.4 from [~Upendra] [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=213bdbd ] CLOUDSTACK-6223. removeNicFromVirtualMachine fails if another instance in another domain has a nic with the same ip and a forwarding rule configured on it Signed-off-by: Daan Hoogland <d...@onecht.net> (cherry picked from commit e9af5f44ae080da3f191cba57b55747801c3100e) > 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<FirewallRuleVO> listAssociatedRulesForGuestNic(Nic nic){ > List<FirewallRuleVO> result = new ArrayList<FirewallRuleVO>(); > // 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.3.4#6332)