From a98eb12549a900c7f88acc68457957a4a955fecd Mon Sep 17 00:00:00 2001 From: Chiradeep Vittal Date: Fri, 30 Aug 2013 14:27:40 -0700 Subject: [PATCH] CLOUDSTACK-4575: Portable IP: disassociating a transferred public IP fails The code is excessively complicated and convoluted. DisassociateIP -> Revoke Rule -> {FW, PF{incl SNAT}, LB, RA VPN} -> -> Send IpAssoc (false) to VR Send all config to VR again -> Send IpAssoc(false) to VR again <---- fails here since it cannot find the VLAN for the IP since it is already gone -> Mark Ip as released The workaround fix would be to not throw an exception in CitrixResourceBase if it is disassociate and the VLAN does not exist on the XS host. Signed-off-by: Chiradeep Vittal --- .../com/cloud/hypervisor/xen/resource/CitrixResourceBase.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 815299b361c..9f254c35a65 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -2299,6 +2299,9 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe if (add && correctVif == null) { addVif = true; } + if (!add && correctVif == null) { + return; // it is a disassociateIp and it has already happened + } if (addVif) { // Add a new VIF to DomR